diff options
Diffstat (limited to 'Mac/Lib')
38 files changed, 0 insertions, 3359 deletions
diff --git a/Mac/Lib/dbmac.py b/Mac/Lib/dbmac.py deleted file mode 100644 index 0588dbd..0000000 --- a/Mac/Lib/dbmac.py +++ /dev/null @@ -1,140 +0,0 @@ -"""A slow but simple dbm clone for the Mac. - -For database spam, spam.dir contains the index (a text file), -spam.bak *may* contain a backup of the index (also a text file), -while spam.dat contains the data (a binary file). - -XXX TO DO: - -- reclaim free space (currently, space once occupied by deleted or expanded -items is never reused) - -- support concurrent access (currently, if two processes take turns making -updates, they can mess up the index) - -- support efficient access to large databases (currently, the whole index -is read when the database is opened, and some updates rewrite the whole index) - -- support opening for read-only (flag = 'm') - -""" - -_os = __import__('os') -import __builtin__ - -_open = __builtin__.open - -_BLOCKSIZE = 512 - -class _Database: - - def __init__(self, file): - self._dirfile = file + '.dir' - self._datfile = file + '.dat' - self._bakfile = file + '.bak' - # Mod by Jack: create data file if needed - try: - f = _open(self._datfile, 'r') - except IOError: - f = _open(self._datfile, 'w') - f.close() - self._update() - - def _update(self): - self._index = {} - try: - f = _open(self._dirfile) - except IOError: - pass - else: - while 1: - line = f.readline() - if not line: break - key, (pos, siz) = eval(line) - self._index[key] = (pos, siz) - f.close() - - def _commit(self): - try: _os.unlink(self._bakfile) - except _os.error: pass - try: _os.rename(self._dirfile, self._bakfile) - except _os.error: pass - f = _open(self._dirfile, 'w') - for key, (pos, siz) in self._index.items(): - f.write("%s, (%s, %s)\n" % (`key`, `pos`, `siz`)) - f.close() - - def __getitem__(self, key): - pos, siz = self._index[key] # may raise KeyError - f = _open(self._datfile, 'rb') - f.seek(pos) - dat = f.read(siz) - f.close() - return dat - - def _addval(self, val): - f = _open(self._datfile, 'rb+') - f.seek(0, 2) - pos = f.tell() -## Does not work under MW compiler -## pos = ((pos + _BLOCKSIZE - 1) / _BLOCKSIZE) * _BLOCKSIZE -## f.seek(pos) - npos = ((pos + _BLOCKSIZE - 1) / _BLOCKSIZE) * _BLOCKSIZE - f.write('\0'*(npos-pos)) - pos = npos - - f.write(val) - f.close() - return (pos, len(val)) - - def _setval(self, pos, val): - f = _open(self._datfile, 'rb+') - f.seek(pos) - f.write(val) - f.close() - return pos, (val) - - def _addkey(self, key, (pos, siz)): - self._index[key] = (pos, siz) - f = _open(self._dirfile, 'a') - f.write("%s, (%s, %s)\n" % (`key`, `pos`, `siz`)) - f.close() - - def __setitem__(self, key, val): - if not type(key) == type('') == type(val): - raise TypeError, "dbmac keys and values must be strings" - if not self._index.has_key(key): - (pos, siz) = self._addval(val) - self._addkey(key, (pos, siz)) - else: - pos, siz = self._index[key] - oldblocks = (siz + _BLOCKSIZE - 1) / _BLOCKSIZE - newblocks = (len(val) + _BLOCKSIZE - 1) / _BLOCKSIZE - if newblocks <= oldblocks: - pos, siz = self._setval(pos, val) - self._index[key] = pos, siz - else: - pos, siz = self._addval(val) - self._index[key] = pos, siz - self._addkey(key, (pos, siz)) - - def __delitem__(self, key): - del self._index[key] - self._commit() - - def keys(self): - return self._index.keys() - - def has_key(self, key): - return self._index.has_key(key) - - def __len__(self): - return len(self._index) - - def close(self): - self._index = self._datfile = self._dirfile = self._bakfile = None - - -def open(file, flag = None, mode = None): - # flag, mode arguments are currently ignored - return _Database(file) diff --git a/Mac/Lib/maccache.py b/Mac/Lib/maccache.py deleted file mode 100644 index 1e2b3d0..0000000 --- a/Mac/Lib/maccache.py +++ /dev/null @@ -1,61 +0,0 @@ -# Module 'maccache' -# -# Maintain a cache of listdir(), isdir(), isfile() or exists() outcomes. -# XXX Should merge with module statcache - -import os - - -# The cache. -# Keys are absolute pathnames; -# values are 0 (nothing), 1 (file) or [...] (dir). -# -cache = {} - - -# Current working directory. -# -cwd = os.getcwd() - - -# Constants. -# -NONE = 0 -FILE = 1 -LISTTYPE = type([]) - -def _stat(name): - name = os.path.join(cwd, name) - if cache.has_key(name): - return cache[name] - if os.path.isfile(name): - cache[name] = FILE - return FILE - try: - list = os.listdir(name) - except: - cache[name] = NONE - return NONE - cache[name] = list - if name[-1:] == ':': cache[name[:-1]] = list - else: cache[name+':'] = list - return list - -def isdir(name): - st = _stat(name) - return type(st) == LISTTYPE - -def isfile(name): - st = _stat(name) - return st == FILE - -def exists(name): - st = _stat(name) - return st <> NONE - -def listdir(name): - st = _stat(name) - if type(st) == LISTTYPE: - return st - else: - raise RuntimeError, 'list non-directory' diff --git a/Mac/Lib/mactty.py b/Mac/Lib/mactty.py deleted file mode 100644 index e09a50c..0000000 --- a/Mac/Lib/mactty.py +++ /dev/null @@ -1,74 +0,0 @@ -# -# mactty module - Use a terminal line as communications channel. -# -# Note that this module is not very complete or well-designed, but it -# will have to serve until I have time to write something better. A unix -# module with the same API is available too, contact me (jack@cwi.nl) -# if you need it. -# -# Usage: -# t = Tty(toolname) -# t.raw() Set in raw/no-echo mode -# t.baudrate(rate) Set baud rate -# t.reset() Back to normal -# t.read(len) Read up to 'len' bytes (but often reads less) -# t.readall(len) Read 'len' bytes -# t.timedread(len,tout) Read upto 'len' bytes, or until 'tout' seconds idle -# t.getmode() Get parameters as a string -# t.setmode(args) Set parameters -# -# Jack Jansen, CWI, January 1997 -# -import ctb -DEBUG=1 - -class Tty: - def __init__(self, name=None): - self.connection = ctb.CMNew('Serial Tool', (10000, 10000, 0, 0, 0, 0)) - #self.orig_data = self.connection.GetConfig() - #if name: - # self.connection.SetConfig(self.orig_data + ' Port "%s"'%name) - self.connection.Open(10) - sizes, status = self.connection.Status() - - def getmode(self): - return self.connection.GetConfig() - - def setmode(self, mode): - length = self.connection.SetConfig(mode) - if length != 0 and length != len(mode): - raise 'SetConfig Error', (mode[:length], mode[length:]) - - def raw(self): - pass - - def baudrate(self, rate): - self.setmode(self.getmode()+' baud %d'%rate) - - def reset(self): - self.setmode(self.orig_data) - - def readall(self, length): - data = '' - while len(data) < length: - data = data + self.read(length-len(data)) - return data - - def timedread(self,length, timeout): - self.connection.Idle() - data, eom = self.connection.Read(length, ctb.cmData, timeout*10) - if DEBUG: - print 'Timedread(%d, %d)->%s'%(length, timeout, `data`) - return data - - def read(self, length): - return self.timedread(length, 0x3fffffff) - - def write(self, data): - if DEBUG: - print 'Write(%s)'%`data` - while data: - self.connection.Idle() - done = self.connection.Write(data, ctb.cmData, 0x3fffffff, 0) - self.connection.Idle() - data = data[done:] diff --git a/Mac/Lib/mkcwproject/__init__.py b/Mac/Lib/mkcwproject/__init__.py deleted file mode 100644 index d6920b6..0000000 --- a/Mac/Lib/mkcwproject/__init__.py +++ /dev/null @@ -1,80 +0,0 @@ -import cwxmlgen -import cwtalker -import os -from Carbon import AppleEvents -import Carbon.File - -def mkproject(outputfile, modulename, settings, force=0, templatename=None): - # - # Copy the dictionary - # - dictcopy = {} - for k, v in settings.items(): - dictcopy[k] = v - # - # Generate the XML for the project - # - dictcopy['mac_projectxmlname'] = outputfile + '.xml' - dictcopy['mac_exportname'] = os.path.split(outputfile)[1] + '.exp' - if not dictcopy.has_key('mac_dllname'): - dictcopy['mac_dllname'] = modulename + '.ppc.slb' - if not dictcopy.has_key('mac_targetname'): - dictcopy['mac_targetname'] = modulename + '.ppc' - - xmlbuilder = cwxmlgen.ProjectBuilder(dictcopy, templatename=templatename) - xmlbuilder.generate() - if not force: - # We do a number of checks and all must succeed before we decide to - # skip the build-project step: - # 1. the xml file must exist, and its content equal to what we've generated - # 2. the project file must exist and be newer than the xml file - # 3. the .exp file must exist - if os.path.exists(dictcopy['mac_projectxmlname']): - fp = open(dictcopy['mac_projectxmlname']) - data = fp.read() - fp.close() - if data == dictcopy["tmp_projectxmldata"]: - if os.path.exists(outputfile) and \ - os.stat(outputfile)[os.path.ST_MTIME] > os.stat(dictcopy['mac_projectxmlname'])[os.path.ST_MTIME]: - if os.path.exists(outputfile + '.exp'): - return - fp = open(dictcopy['mac_projectxmlname'], "w") - fp.write(dictcopy["tmp_projectxmldata"]) - fp.close() - # - # Generate the export file - # - fp = open(outputfile + '.exp', 'w') - fp.write('init%s\n'%modulename) - if dictcopy.has_key('extraexportsymbols'): - for sym in dictcopy['extraexportsymbols']: - fp.write('%s\n'%sym) - fp.close() - # - # Generate the project from the xml - # - makeproject(dictcopy['mac_projectxmlname'], outputfile) - -def makeproject(xmlfile, projectfile): - cw = cwtalker.MyCodeWarrior(start=1) - cw.send_timeout = AppleEvents.kNoTimeOut - xmlfss = Carbon.File.FSSpec(xmlfile) - prjfss = Carbon.File.FSSpec(projectfile) - cw.my_mkproject(prjfss, xmlfss) - cw.Close_Project() - -def buildproject(projectfile): - cw = cwtalker.MyCodeWarrior(start=1) - cw.send_timeout = AppleEvents.kNoTimeOut - prjfss = Carbon.File.FSSpec(projectfile) - cw.open(prjfss) - cw.Make_Project() # XXX Should set target - cw.Close_Project() - -def cleanproject(projectfile): - cw = cwtalker.MyCodeWarrior(start=1) - cw.send_timeout = AppleEvents.kNoTimeOut - prjfss = Carbon.File.FSSpec(projectfile) - cw.open(prjfss) - cw.Remove_Binaries() - diff --git a/Mac/Lib/mkcwproject/cwtalker.py b/Mac/Lib/mkcwproject/cwtalker.py deleted file mode 100644 index 650fd43..0000000 --- a/Mac/Lib/mkcwproject/cwtalker.py +++ /dev/null @@ -1,36 +0,0 @@ -import CodeWarrior -import aetools -import aetypes - -# There is both a class "project document" and a property "project document". -# We want the class, but the property overrides it. -# -##class project_document(aetools.ComponentItem): -## """project document - a project document """ -## want = 'PRJD' -project_document=aetypes.Type('PRJD') - -class MyCodeWarrior(CodeWarrior.CodeWarrior): - # Bug in the CW OSA dictionary - def export(self, object, _attributes={}, **_arguments): - """export: Export the project file as an XML file - Keyword argument _in: the XML file in which to export the project - Keyword argument _attributes: AppleEvent attribute dictionary - """ - _code = 'CWIE' - _subcode = 'EXPT' - - aetools.keysubst(_arguments, self._argmap_export) - _arguments['----'] = _object - - - _reply, _arguments, _attributes = self.send(_code, _subcode, - _arguments, _attributes) - if _arguments.has_key('errn'): - raise aetools.Error, aetools.decodeerror(_arguments) - # XXXX Optionally decode result - if _arguments.has_key('----'): - return _arguments['----'] - - def my_mkproject(self, prjfile, xmlfile): - self.make(new=project_document, with_data=xmlfile, as=prjfile) diff --git a/Mac/Lib/mkcwproject/cwxmlgen.py b/Mac/Lib/mkcwproject/cwxmlgen.py deleted file mode 100644 index 3d3e4b2..0000000 --- a/Mac/Lib/mkcwproject/cwxmlgen.py +++ /dev/null @@ -1,142 +0,0 @@ -# First attempt at automatically generating CodeWarior projects -import os -import MacOS -import string - -Error="gencwproject.Error" -# -# These templates are executed in-order. -# -TEMPLATELIST= [ - ("tmp_allsources", "file", "template-allsources.xml", "sources"), - ("tmp_linkorder", "file", "template-linkorder.xml", "sources"), - ("tmp_grouplist", "file", "template-grouplist.xml", "sources"), - ("tmp_alllibraries", "file", "template-alllibraries.xml", "libraries"), - ("tmp_linkorderlib", "file", "template-linkorderlib.xml", "libraries"), - ("tmp_grouplistlib", "file", "template-grouplistlib.xml", "libraries"), - ("tmp_extrasearchdirs", "file", "template-searchdirs.xml", "extrasearchdirs"), - ("tmp_projectxmldata", "file", "template.prj.xml", None) -] - -class ProjectBuilder: - def __init__(self, dict, templatelist=TEMPLATELIST, templatename=None): - self._adddefaults(dict) - if templatename == None: - if hasattr(MacOS, 'runtimemodel'): - templatename = 'template-%s'%MacOS.runtimemodel - else: - templatename = 'template' - if os.sep in templatename: - templatedir = templatename - else: - try: - packagedir = os.path.split(__file__)[0] - except NameError: - packagedir = os.curdir - templatedir = os.path.join(packagedir, templatename) - if not os.path.exists(templatedir): - raise Error, "Cannot find templatedir %s"%templatedir - self.dict = dict - if not dict.has_key('prefixname'): - if hasattr(MacOS, 'runtimemodel') and MacOS.runtimemodel == "carbon": - dict['prefixname'] = 'mwerks_shcarbon_pch' - else: - dict['prefixname'] = 'mwerks_plugin_config.h' - self.templatelist = templatelist - self.templatedir = templatedir - - def _adddefaults(self, dict): - # Set all suitable defaults set for values which were omitted. - if not dict.has_key('mac_outputdir'): - dict['mac_outputdir'] = ':lib:' - if not dict.has_key('stdlibraryflags'): - dict['stdlibraryflags'] = 'Debug' - if not dict.has_key('libraryflags'): - dict['libraryflags'] = 'Debug' - if not dict.has_key('initialize'): - dict['initialize'] = '__initialize' - if not dict.has_key('mac_sysprefixtype'): - if os.path.isabs(dict['sysprefix']): - dict['mac_sysprefixtype'] = 'Absolute' - else: - dict['mac_sysprefixtype'] = 'Project' # XXX not sure this is right... - - def generate(self): - for tmpl in self.templatelist: - self._generate_one_template(tmpl) - - def _generate_one_template(self, tmpl): - resultname, datasource, dataname, key = tmpl - result = '' - if key: - # This is a multi-element rule. Run for every item in dict[key] - if self.dict.has_key(key): - keyvalues = self.dict[key] - try: - if not type(keyvalues) in (type(()), type([])): - raise Error, "List or tuple expected for %s"%key - for curkeyvalue in keyvalues: - if string.lower(curkeyvalue[:10]) == '{compiler}': - curkeyvalue = curkeyvalue[10:] - self.dict['pathtype'] = 'CodeWarrior' - elif string.lower(curkeyvalue[:9]) == '{project}': - curkeyvalue = curkeyvalue[9:] - self.dict['pathtype'] = 'Project' - elif curkeyvalue[0] == '{': - raise Error, "Unknown {} escape in %s"%curkeyvalue - elif os.path.isabs(curkeyvalue): - self.dict['pathtype'] = 'Absolute' - else: - self.dict['pathtype'] = 'Project' - if curkeyvalue[-2:] == ':*': - curkeyvalue = curkeyvalue[:-2] - self.dict['recursive'] = 'true' - else: - self.dict['recursive'] = 'false' - self.dict[key] = curkeyvalue - curkeyvalueresult = self._generate_one_value(datasource, dataname) - result = result + curkeyvalueresult - finally: - # Restore the list - self.dict[key] = keyvalues - self.dict['pathtype'] = None - del self.dict['pathtype'] - self.dict['recursive'] = None - del self.dict['recursive'] - else: - # Not a multi-element rule. Simply generate - result = self._generate_one_value(datasource, dataname) - # And store the result - self.dict[resultname] = result - - def _generate_one_value(self, datasource, dataname): - if datasource == 'file': - filepath = os.path.join(self.templatedir, dataname) - fp = open(filepath, "r") - format = fp.read() - elif datasource == 'string': - format = dataname - else: - raise Error, 'Datasource should be file or string, not %s'%datasource - return format % self.dict - -def _test(): - dict = { - "mac_projectxmlname" : "controlstrip.prj.xml", # The XML filename (full path) - "mac_exportname" : "controlstrip.prj.exp", # Export file (relative to project) - "mac_outputdir" : ":", # The directory where the DLL is put (relative to project) - "mac_dllname" : "controlstrip.ppc.slb", # The DLL filename (within outputdir) - "mac_targetname" : "controlstrip.ppc", # The targetname within the project - "sysprefix" : sys.prefix, # Where the Python sources live - "mac_sysprefixtype" : "Absolute", # Type of previous pathname - "sources" : ["controlstripmodule.c"], - "extrasearchdirs": [], # -I and -L, in unix terms - } - pb = ProjectBuilder(dict) - pb.generate() - fp = open(dict["mac_projectxmlname"], "w") - fp.write(dict["tmp_projectxmldata"]) - -if __name__ == '__main__': - _test() - diff --git a/Mac/Lib/mkcwproject/template-carbon/template-alllibraries.xml b/Mac/Lib/mkcwproject/template-carbon/template-alllibraries.xml deleted file mode 100644 index 1b10dbb..0000000 --- a/Mac/Lib/mkcwproject/template-carbon/template-alllibraries.xml +++ /dev/null @@ -1,7 +0,0 @@ - <FILE> - <PATHTYPE>Name</PATHTYPE> - <PATH>%(libraries)s</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - <FILEKIND>Library</FILEKIND> - <FILEFLAGS>%(libraryflags)s</FILEFLAGS> - </FILE> diff --git a/Mac/Lib/mkcwproject/template-carbon/template-allsources.xml b/Mac/Lib/mkcwproject/template-carbon/template-allsources.xml deleted file mode 100644 index 5bca166..0000000 --- a/Mac/Lib/mkcwproject/template-carbon/template-allsources.xml +++ /dev/null @@ -1,7 +0,0 @@ - <FILE> - <PATHTYPE>Name</PATHTYPE> - <PATH>%(sources)s</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - <FILEKIND>Text</FILEKIND> - <FILEFLAGS></FILEFLAGS> - </FILE> diff --git a/Mac/Lib/mkcwproject/template-carbon/template-grouplist.xml b/Mac/Lib/mkcwproject/template-carbon/template-grouplist.xml deleted file mode 100644 index a05364a..0000000 --- a/Mac/Lib/mkcwproject/template-carbon/template-grouplist.xml +++ /dev/null @@ -1,6 +0,0 @@ - <FILEREF> - <TARGETNAME>%(mac_targetname)s</TARGETNAME> - <PATHTYPE>Name</PATHTYPE> - <PATH>%(sources)s</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> diff --git a/Mac/Lib/mkcwproject/template-carbon/template-grouplistlib.xml b/Mac/Lib/mkcwproject/template-carbon/template-grouplistlib.xml deleted file mode 100644 index 043313c..0000000 --- a/Mac/Lib/mkcwproject/template-carbon/template-grouplistlib.xml +++ /dev/null @@ -1,6 +0,0 @@ - <FILEREF> - <TARGETNAME>%(mac_targetname)s</TARGETNAME> - <PATHTYPE>Name</PATHTYPE> - <PATH>%(libraries)s</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> diff --git a/Mac/Lib/mkcwproject/template-carbon/template-linkorder.xml b/Mac/Lib/mkcwproject/template-carbon/template-linkorder.xml deleted file mode 100644 index 7f24a7c..0000000 --- a/Mac/Lib/mkcwproject/template-carbon/template-linkorder.xml +++ /dev/null @@ -1,5 +0,0 @@ - <FILEREF> - <PATHTYPE>Name</PATHTYPE> - <PATH>%(sources)s</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> diff --git a/Mac/Lib/mkcwproject/template-carbon/template-linkorderlib.xml b/Mac/Lib/mkcwproject/template-carbon/template-linkorderlib.xml deleted file mode 100644 index ecd2c6b..0000000 --- a/Mac/Lib/mkcwproject/template-carbon/template-linkorderlib.xml +++ /dev/null @@ -1,5 +0,0 @@ - <FILEREF> - <PATHTYPE>Name</PATHTYPE> - <PATH>%(libraries)s</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> diff --git a/Mac/Lib/mkcwproject/template-carbon/template-searchdirs.xml b/Mac/Lib/mkcwproject/template-carbon/template-searchdirs.xml deleted file mode 100644 index ae1b353..0000000 --- a/Mac/Lib/mkcwproject/template-carbon/template-searchdirs.xml +++ /dev/null @@ -1,9 +0,0 @@ - <SETTING> - <SETTING><NAME>SearchPath</NAME> - <SETTING><NAME>Path</NAME><VALUE>%(extrasearchdirs)s</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>%(pathtype)s</VALUE></SETTING> - </SETTING> - <SETTING><NAME>Recursive</NAME><VALUE>%(recursive)s</VALUE></SETTING> - <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> - </SETTING> diff --git a/Mac/Lib/mkcwproject/template-carbon/template.prj.xml b/Mac/Lib/mkcwproject/template-carbon/template.prj.xml deleted file mode 100644 index 5c426a1..0000000 --- a/Mac/Lib/mkcwproject/template-carbon/template.prj.xml +++ /dev/null @@ -1,710 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> -<?codewarrior exportversion="1.0.1" ideversion="4.2" ?> - -<!DOCTYPE PROJECT [ -<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)> -<!ELEMENT TARGETLIST (TARGET+)> -<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?, FRAMEWORKLIST)> -<!ELEMENT NAME (#PCDATA)> -<!ELEMENT USERSOURCETREETYPE (#PCDATA)> -<!ELEMENT PATH (#PCDATA)> -<!ELEMENT FILELIST (FILE*)> -<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)> -<!ELEMENT PATHTYPE (#PCDATA)> -<!ELEMENT PATHROOT (#PCDATA)> -<!ELEMENT ACCESSPATH (#PCDATA)> -<!ELEMENT PATHFORMAT (#PCDATA)> -<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)> -<!ELEMENT FILEKIND (#PCDATA)> -<!ELEMENT FILEFLAGS (#PCDATA)> -<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)> -<!ELEMENT TARGETNAME (#PCDATA)> -<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)> -<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))> -<!ELEMENT PANELDATA (NAME, VALUE)> -<!ELEMENT VALUE (#PCDATA)> -<!ELEMENT LINKORDER (FILEREF*)> -<!ELEMENT SEGMENTLIST (SEGMENT+)> -<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)> -<!ELEMENT ATTRIBUTES (#PCDATA)> -<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)> -<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)> -<!ELEMENT BASEADDRESS (#PCDATA)> -<!ELEMENT OVERLAY (NAME, FILEREF*)> -<!ELEMENT SUBTARGETLIST (SUBTARGET+)> -<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?, FILEREF?)> -<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)> -<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)> -<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)> -<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?, FILEREF?)> -<!ELEMENT FRAMEWORKLIST (FRAMEWORK+)> -<!ELEMENT FRAMEWORK (FILEREF, LIBRARYFILE?, VERSION?)> -<!ELEMENT LIBRARYFILE (FILEREF)> -<!ELEMENT VERSION (#PCDATA)> -<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*> -<!ELEMENT ORDEREDTARGET (NAME)> -<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)> -<!ELEMENT GROUPLIST (GROUP|FILEREF)*> -<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)> -<!ELEMENT DESIGNLIST (DESIGN+)> -<!ELEMENT DESIGN (NAME, DESIGNDATA)> -<!ELEMENT DESIGNDATA (#PCDATA)> -]> - -<PROJECT> - <TARGETLIST> - <TARGET> - <NAME>%(mac_targetname)s</NAME> - <SETTINGLIST> - - <!-- Settings for "Source Trees" panel --> - <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING> - - <!-- Settings for "Access Paths" panel --> - <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>UserSearchPaths</NAME> - <SETTING> - <SETTING><NAME>SearchPath</NAME> - <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> - </SETTING> - <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> - </SETTING> - %(tmp_extrasearchdirs)s - <SETTING> - <SETTING><NAME>SearchPath</NAME> - <SETTING><NAME>Path</NAME><VALUE>%(sysprefix)sMac:</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>%(mac_sysprefixtype)s</VALUE></SETTING> - </SETTING> - <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>SearchPath</NAME> - <SETTING><NAME>Path</NAME><VALUE>%(sysprefix)sInclude:</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>%(mac_sysprefixtype)s</VALUE></SETTING> - </SETTING> - <SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>SearchPath</NAME> - <SETTING><NAME>Path</NAME><VALUE>%(sysprefix)s</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>%(mac_sysprefixtype)s</VALUE></SETTING> - </SETTING> - <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> - </SETTING> - </SETTING> - <SETTING><NAME>SystemSearchPaths</NAME> - <SETTING> - <SETTING><NAME>SearchPath</NAME> - <SETTING><NAME>Path</NAME><VALUE>%(sysprefix)s:GUSI2:include:</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>%(mac_sysprefixtype)s</VALUE></SETTING> - </SETTING> - <SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>SearchPath</NAME> - <SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> - </SETTING> - <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>SearchPath</NAME> - <SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING> - </SETTING> - <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING> - </SETTING> - </SETTING> - - <!-- Settings for "Debugger Runtime" panel --> - <SETTING><NAME>MWRuntimeSettings_WorkingDirectory</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>MWRuntimeSettings_CommandLine</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>MWRuntimeSettings_HostApplication</NAME> - <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> - </SETTING> - <SETTING><NAME>MWRuntimeSettings_EnvVars</NAME><VALUE></VALUE></SETTING> - - <!-- Settings for "Target Settings" panel --> - <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING> - <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Targetname</NAME><VALUE>%(mac_targetname)s</VALUE></SETTING> - <SETTING><NAME>OutputDirectory</NAME> - <SETTING><NAME>Path</NAME><VALUE>%(mac_outputdir)s</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> - </SETTING> - <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING> - - <!-- Settings for "File Mappings" panel --> - <SETTING><NAME>FileMappings</NAME> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>MW Rez</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING> - </SETTING> - <SETTING> - <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING> - <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING> - </SETTING> - </SETTING> - - <!-- Settings for "Build Extras" panel --> - <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>DebuggerAppPath</NAME> - <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> - </SETTING> - <SETTING><NAME>DebuggerCmdLineArgs</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>DebuggerWorkingDir</NAME> - <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> - </SETTING> - - <!-- Settings for "Debugger Target" panel --> - <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING> - <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>AltExePath</NAME> - <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING> - </SETTING> - <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING> - <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING> - <SETTING><NAME>TempBPType</NAME><VALUE>0</VALUE></SETTING> - - <!-- Settings for "Remote Debug" panel --> - <SETTING><NAME>Enabled</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>ConnectionName</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>DownloadPath</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>LaunchRemoteApp</NAME><VALUE>false</VALUE></SETTING> - <SETTING><NAME>RemoteAppPath</NAME><VALUE></VALUE></SETTING> - - <!-- Settings for "Auto-target" panel --> - <SETTING><NAME>OtherExecutables</NAME><VALUE></VALUE></SETTING> - - - <!-- Settings for "C/C++ Compiler" panel --> - <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>%(prefixname)s</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING> - - <!-- Settings for "C/C++ Warnings" panel --> - <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING> - - <!-- Settings for "MacOS Merge Panel" panel --> - <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING> - <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING> - <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>1061109567</VALUE></SETTING> - <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>1095782476</VALUE></SETTING> - <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWMerge_MacOS_flattenResource</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWMerge_MacOS_flatFileName</NAME><VALUE>a.rsrc</VALUE></SETTING> - <SETTING><NAME>MWMerge_MacOS_flatFileOutputPath</NAME> - <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> - </SETTING> - <SETTING><NAME>MWMerge_MacOS_skipResources</NAME> - <SETTING><VALUE> </VALUE></SETTING> - <SETTING><VALUE>ª¿°</VALUE></SETTING> - <SETTING><VALUE>ß^h</VALUE></SETTING> - <SETTING><VALUE>ѧ0</VALUE></SETTING> - </SETTING> - - <!-- Settings for "Packager Panel" panel --> - <SETTING><NAME>MWMacOSPackager_UsePackager</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWMacOSPackager_FolderToPackage</NAME> - <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> - </SETTING> - <SETTING><NAME>MWMacOSPackager_CreateClassicAlias</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWMacOSPackager_ClassicAliasMethod</NAME><VALUE>UseTargetOutput</VALUE></SETTING> - <SETTING><NAME>MWMacOSPackager_ClassicAliasPath</NAME> - <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING> - <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING> - <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING> - </SETTING> - <SETTING><NAME>MWMacOSPackager_CreatePkgInfo</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWMacOSPackager_PkgCreatorType</NAME><VALUE>????</VALUE></SETTING> - <SETTING><NAME>MWMacOSPackager_PkgFileType</NAME><VALUE>APPL</VALUE></SETTING> - - <!-- Settings for "PPC CodeGen" panel --> - <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC</VALUE></SETTING> - <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING> - <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>P601</VALUE></SETTING> - <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWCodeGen_PPC_processorspecific</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWCodeGen_PPC_vrsave</NAME><VALUE>0</VALUE></SETTING> - - <!-- Settings for "PPC Disassembler" panel --> - <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING> - - <!-- Settings for "PPC Global Optimizer" panel --> - <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING> - <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING> - - <!-- Settings for "PPC Linker" panel --> - <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING> - <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE>%(initialize)s</VALUE></SETTING> - <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE>__terminate</VALUE></SETTING> - - <!-- Settings for "PPC PEF" panel --> - <SETTING><NAME>MWPEF_exports</NAME><VALUE>File</VALUE></SETTING> - <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING> - <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING> - - <!-- Settings for "PPC Project" panel --> - <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>SharedLibrary</VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>%(mac_dllname)s</VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>1350136936</VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>1936223330</VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>1061109567</VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING> - - <!-- Settings for "PPCAsm Panel" panel --> - <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING> - <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING> - <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING> - - <!-- Settings for "Rez Compiler" panel --> - <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING> - <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING> - <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING> - <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING> - <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING> - <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING> - <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING> - <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING> - </SETTINGLIST> - <FILELIST> -%(tmp_allsources)s - <FILE> - <PATHTYPE>Name</PATHTYPE> - <PATH>MSL_ShLibRuntime_PPC.Lib</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - <FILEKIND>Library</FILEKIND> - <FILEFLAGS>Debug</FILEFLAGS> - </FILE> - <FILE> - <PATHTYPE>Name</PATHTYPE> - <PATH>%(mac_exportname)s</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - <FILEKIND>Text</FILEKIND> - <FILEFLAGS>Debug</FILEFLAGS> - </FILE> -%(tmp_alllibraries)s - <FILE> - <PATHTYPE>Name</PATHTYPE> - <PATH>PythonCoreCarbon</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - <FILEKIND>Library</FILEKIND> - <FILEFLAGS></FILEFLAGS> - </FILE> - <FILE> - <PATHTYPE>Name</PATHTYPE> - <PATH>CarbonLib</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - <FILEKIND>Library</FILEKIND> - <FILEFLAGS>%(stdlibraryflags)s</FILEFLAGS> - </FILE> - </FILELIST> - <LINKORDER> -%(tmp_linkorder)s - <FILEREF> - <PATHTYPE>Name</PATHTYPE> - <PATH>MSL_ShLibRuntime_PPC.Lib</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> - <FILEREF> - <PATHTYPE>Name</PATHTYPE> - <PATH>%(mac_exportname)s</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> -%(tmp_linkorderlib)s - <FILEREF> - <PATHTYPE>Name</PATHTYPE> - <PATH>CarbonLib</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> - <FILEREF> - <PATHTYPE>Name</PATHTYPE> - <PATH>PythonCoreCarbon</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> - </LINKORDER> - </TARGET> - </TARGETLIST> - - <TARGETORDER> - <ORDEREDTARGET><NAME>%(mac_targetname)s</NAME></ORDEREDTARGET> - </TARGETORDER> - - <GROUPLIST> - <GROUP><NAME>Sources</NAME> -%(tmp_grouplist)s - <FILEREF> - <TARGETNAME>%(mac_targetname)s</TARGETNAME> - <PATHTYPE>Name</PATHTYPE> - <PATH>%(mac_exportname)s</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> - </GROUP> - <GROUP><NAME>Libraries</NAME> - <FILEREF> - <TARGETNAME>%(mac_targetname)s</TARGETNAME> - <PATHTYPE>Name</PATHTYPE> - <PATH>MSL_ShLibRuntime_PPC.Lib</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> -%(tmp_grouplistlib)s - <FILEREF> - <TARGETNAME>%(mac_targetname)s</TARGETNAME> - <PATHTYPE>Name</PATHTYPE> - <PATH>PythonCoreCarbon</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> - <FILEREF> - <TARGETNAME>%(mac_targetname)s</TARGETNAME> - <PATHTYPE>Name</PATHTYPE> - <PATH>CarbonLib</PATH> - <PATHFORMAT>MacOS</PATHFORMAT> - </FILEREF> - </GROUP> - </GROUPLIST> - -</PROJECT> diff --git a/Mac/Lib/nsremote.py b/Mac/Lib/nsremote.py deleted file mode 100644 index a12cd35..0000000 --- a/Mac/Lib/nsremote.py +++ /dev/null @@ -1,65 +0,0 @@ -"""nsremote - Control Netscape from python. - -Interface modelled after unix-interface done -by hassan@cs.stanford.edu. - -Jack Jansen, CWI, January 1996. -""" -# -# Note: this module currently uses the funny SpyGlass AppleEvents, since -# these seem to be the only way to get the info from Netscape. It would -# be nicer to use the more "object oriented" standard OSA stuff, when it -# is implemented in Netscape. -# -import sys - -import aetools -import Netscape -import MacOS - -Error = 'nsremote.Error' - -_talker = None - -def _init(): - global _talker - if _talker == None: - _talker = Netscape.Netscape() - -def list(dpyinfo=""): - _init() - list = _talker.list_windows() - return map(lambda x: (x, 'version unknown'), list) - -def geturl(windowid=0, dpyinfo=""): - _init() - if windowid == 0: - ids = _talker.list_windows() - if not ids: - raise Error, 'No netscape windows open' - windowid = ids[0] - info = _talker.get_window_info(windowid) - return info - -def openurl(url, windowid=0, dpyinfo=""): - _init() - if windowid == 0: - _talker.OpenURL(url) - else: - _talker.OpenURL(url, toWindow=windowid) - -def _test(): - """Test program: Open www.python.org in all windows, then revert""" - import sys - windows_and_versions = list() - windows_and_urls = map(lambda x: (x[0], geturl(x[0])[0]), windows_and_versions) - for id, version in windows_and_versions: - openurl('http://www.python.org/', windowid=id) - print 'Type return to revert to old contents-' - sys.stdin.readline() - for id, url in windows_and_urls: - openurl(url, id) - -if __name__ == '__main__': - _test() - diff --git a/Mac/Lib/preferences.py b/Mac/Lib/preferences.py deleted file mode 100644 index 8b77012..0000000 --- a/Mac/Lib/preferences.py +++ /dev/null @@ -1,219 +0,0 @@ -# -# General parser/loaders for preferences files and such -# -from Carbon import Res -import macfs -import struct -import MACFS - -READ=1 -READWRITE=3 -Error = "Preferences.Error" - -debug = 0 - -class NullLoader: - def __init__(self, data=None): - self.data = data - - def load(self): - if self.data is None: - raise Error, "No default given" - return self.data - - def save(self, data): - raise Error, "Cannot save to default value" - - def delete(self, deep=0): - if debug: - print 'Attempt to delete default value' - raise Error, "Cannot delete default value" - -_defaultdefault = NullLoader() - -class ResLoader: - def __init__(self, filename, resid, resnum=None, resname=None, default=_defaultdefault): - self.filename = filename - self.fss = macfs.FSSpec(self.filename) - self.resid = resid - self.resnum = resnum - self.resname = resname - self.default = default - self.data = None - - def load(self): - oldrh = Res.CurResFile() - try: - rh = Res.FSpOpenResFile(self.fss, READ) - except Res.Error: - self.data = self.default.load() - return self.data - try: - if self.resname: - handle = Res.Get1NamedResource(self.resid, self.resname) - else: - handle = Res.Get1Resource(self.resid, self.resnum) - except Res.Error: - self.data = self.default.load() - else: - if debug: - print 'Loaded', (self.resid, self.resnum, self.resname), 'from', self.fss.as_pathname() - self.data = handle.data - Res.CloseResFile(rh) - Res.UseResFile(oldrh) - return self.data - - def save(self, data): - if self.data is None or self.data != data: - oldrh = Res.CurResFile() - rh = Res.FSpOpenResFile(self.fss, READWRITE) - try: - handle = Res.Get1Resource(self.resid, self.resnum) - except Res.Error: - handle = Res.Resource(data) - handle.AddResource(self.resid, self.resnum, '') - if debug: - print 'Added', (self.resid, self.resnum), 'to', self.fss.as_pathname() - else: - handle.data = data - handle.ChangedResource() - if debug: - print 'Changed', (self.resid, self.resnum), 'in', self.fss.as_pathname() - Res.CloseResFile(rh) - Res.UseResFile(oldrh) - - def delete(self, deep=0): - if debug: - print 'Deleting in', self.fss.as_pathname(), `self.data`, deep - oldrh = Res.CurResFile() - rh = Res.FSpOpenResFile(self.fss, READWRITE) - try: - handle = Res.Get1Resource(self.resid, self.resnum) - except Res.Error: - if deep: - if debug: print 'deep in', self.default - self.default.delete(1) - else: - handle.RemoveResource() - if debug: - print 'Deleted', (self.resid, self.resnum), 'from', self.fss.as_pathname() - self.data = None - Res.CloseResFile(rh) - Res.UseResFile(oldrh) - -class AnyResLoader: - def __init__(self, resid, resnum=None, resname=None, default=_defaultdefault): - self.resid = resid - self.resnum = resnum - self.resname = resname - self.default = default - self.data = None - - def load(self): - try: - if self.resname: - handle = Res.GetNamedResource(self.resid, self.resname) - else: - handle = Res.GetResource(self.resid, self.resnum) - except Res.Error: - self.data = self.default.load() - else: - self.data = handle.data - return self.data - - def save(self, data): - raise Error, "Cannot save AnyResLoader preferences" - - def delete(self, deep=0): - raise Error, "Cannot delete AnyResLoader preferences" - -class StructLoader: - def __init__(self, format, loader): - self.format = format - self.loader = loader - - def load(self): - data = self.loader.load() - return struct.unpack(self.format, data) - - def save(self, data): - data = apply(struct.pack, (self.format,)+data) - self.loader.save(data) - - def delete(self, deep=0): - self.loader.delete(deep) - -class PstringLoader: - def __init__(self, loader): - self.loader = loader - - def load(self): - data = self.loader.load() - len = ord(data[0]) - return data[1:1+len] - - def save(self, data): - if len(data) > 255: - raise Error, "String too big for pascal-style" - self.loader.save(chr(len(data))+data) - - def delete(self, deep=0): - self.loader.delete(deep) - -class VersionLoader(StructLoader): - def load(self): - while 1: - data = self.loader.load() - if debug: - print 'Versionloader:', `data` - try: - rv = struct.unpack(self.format, data) - rv = self.versioncheck(rv) - return rv - except (struct.error, Error): - self.delete(1) - - def versioncheck(self, data): - return data - -class StrListLoader: - def __init__(self, loader): - self.loader = loader - - def load(self): - data = self.loader.load() - num, = struct.unpack('h', data[:2]) - data = data[2:] - rv = [] - for i in range(num): - strlen = ord(data[0]) - if strlen < 0: strlen = strlen + 256 - str = data[1:strlen+1] - data = data[strlen+1:] - rv.append(str) - return rv - - def save(self, list): - rv = struct.pack('h', len(list)) - for str in list: - rv = rv + chr(len(str)) + str - self.loader.save(rv) - - def delete(self, deep=0): - self.loader.delete(deep) - -def preferencefile(filename, creator=None, type=None): - create = creator != None and type != None - vrefnum, dirid = macfs.FindFolder(MACFS.kOnSystemDisk, 'pref', create) - fss = macfs.FSSpec((vrefnum, dirid, ":Python:" + filename)) - oldrf = Res.CurResFile() - if create: - try: - rh = Res.FSpOpenResFile(fss, READ) - except Res.Error: - Res.FSpCreateResFile(fss, creator, type, MACFS.smAllScripts) - else: - Res.CloseResFile(rh) - Res.UseResFile(oldrf) - return fss - diff --git a/Mac/Lib/py_resource.py b/Mac/Lib/py_resource.py deleted file mode 100644 index 0faf1f1..0000000 --- a/Mac/Lib/py_resource.py +++ /dev/null @@ -1,90 +0,0 @@ -"""Creation of PYC resources""" -import os -from Carbon import Res -import __builtin__ - -READ = 1 -WRITE = 2 -smAllScripts = -3 - -def Pstring(str): - """Return a pascal-style string from a python-style string""" - if len(str) > 255: - raise ValueError, 'String too large' - return chr(len(str))+str - -def create(dst, creator='Pyth'): - """Create output file. Return handle and first id to use.""" - - try: - os.unlink(dst) - except os.error: - pass - Res.FSpCreateResFile(dst, creator, 'rsrc', smAllScripts) - return open(dst) - -def open(dst): - output = Res.FSpOpenResFile(dst, WRITE) - Res.UseResFile(output) - return output - -def writemodule(name, id, data, type='PYC ', preload=0, ispackage=0): - """Write pyc code to a PYC resource with given name and id.""" - # XXXX Check that it doesn't exist - - # Normally, byte 4-7 are the time stamp, but that is not used - # for 'PYC ' resources. We abuse byte 4 as a flag to indicate - # that it is a package rather than an ordinary module. - # See also macimport.c. (jvr) - if ispackage: - data = data[:4] + '\377\0\0\0' + data[8:] # flag resource as package - else: - data = data[:4] + '\0\0\0\0' + data[8:] # clear mod date field, used as package flag - res = Res.Resource(data) - res.AddResource(type, id, name) - if preload: - attrs = res.GetResAttrs() - attrs = attrs | 0x04 - res.SetResAttrs(attrs) - res.WriteResource() - res.ReleaseResource() - -def frompycfile(file, name=None, preload=0, ispackage=0): - """Copy one pyc file to the open resource file""" - if name == None: - d, name = os.path.split(file) - name = name[:-4] - id = findfreeid() - data = __builtin__.open(file, 'rb').read() - writemodule(name, id, data, preload=preload, ispackage=ispackage) - return id, name - -def frompyfile(file, name=None, preload=0, ispackage=0): - """Compile python source file to pyc file and add to resource file""" - import py_compile - - py_compile.compile(file) - file = file +'c' - return frompycfile(file, name, preload=preload, ispackage=ispackage) - -# XXXX Note this is incorrect, it only handles one type and one file.... - -_firstfreeid = None - -def findfreeid(type='PYC '): - """Find next free id-number for given resource type""" - global _firstfreeid - - if _firstfreeid == None: - Res.SetResLoad(0) - highest = 511 - num = Res.Count1Resources(type) - for i in range(1, num+1): - r = Res.Get1IndResource(type, i) - id, d1, d2 = r.GetResInfo() - highest = max(highest, id) - Res.SetResLoad(1) - _firstfreeid = highest+1 - id = _firstfreeid - _firstfreeid = _firstfreeid+1 - return id diff --git a/Mac/Lib/pythonprefs.py b/Mac/Lib/pythonprefs.py deleted file mode 100644 index da28d02..0000000 --- a/Mac/Lib/pythonprefs.py +++ /dev/null @@ -1,123 +0,0 @@ -from preferences import * - -# Names of Python resources -PREFNAME_NAME="PythonPreferenceFileName" - -# Resource IDs in the preferences file -PATH_ID = 228 -DIR_ID = 228 -POPT_ID = 228 -GUSI_ID = 10240 - -# Override IDs (in the applet) -OVERRIDE_PATH_ID = 229 -OVERRIDE_DIR_ID = 229 -OVERRIDE_POPT_ID = 229 -OVERRIDE_GUSI_ID = 10241 - -# version -CUR_VERSION=8 - -preffilename = PstringLoader(AnyResLoader('STR ', resname=PREFNAME_NAME)).load() -pref_fss = preferencefile(preffilename, 'Pyth', 'pref') - -class PoptLoader(VersionLoader): - def __init__(self, loader): - VersionLoader.__init__(self, "bbbbbbbbbbbbbbbb", loader) - - def versioncheck(self, data): - if data[0] == CUR_VERSION: - return data - print 'old resource' - raise Error, "old resource" - -class GusiLoader: - def __init__(self, loader): - self.loader = loader - self.data = None - - def load(self): - self.data = self.loader.load() - while self.data[10:14] != '0181': - self.loader.delete(1) - self.loader.load() - tp = self.data[0:4] - cr = self.data[4:8] - flags = ord(self.data[9]) - return cr, tp - - def save(self, (cr, tp)): - flags = ord(self.data[9]) - newdata = tp + cr + self.data[8:] - self.loader.save(newdata) - -popt_default_default = NullLoader(chr(CUR_VERSION) + 14*'\0' + '\001') -popt_default = AnyResLoader('Popt', POPT_ID, default=popt_default_default) -popt_loader = ResLoader(pref_fss, 'Popt', POPT_ID, default=popt_default) -popt = PoptLoader(popt_loader) - -dir_default = AnyResLoader('alis', DIR_ID) -dir = ResLoader(pref_fss, 'alis', DIR_ID, default=dir_default) - -gusi_default = AnyResLoader('GU\267I', GUSI_ID) -gusi_loader = ResLoader(pref_fss, 'GU\267I', GUSI_ID, default=gusi_default) -gusi = GusiLoader(gusi_loader) - -path_default = AnyResLoader('STR#', PATH_ID) -path_loader = ResLoader(pref_fss, 'STR#', PATH_ID, default=path_default) -path = StrListLoader(path_loader) - -class PythonOptions: - def __init__(self, popt=popt, dir=dir, gusi=gusi, path=path): - self.popt = popt - self.dir = dir - self.gusi = gusi - self.path = path - - def load(self): - dict = {} - dict['path'] = self.path.load() - diralias = self.dir.load() - dirfss, dummy = macfs.RawAlias(diralias).Resolve() - dict['dir'] = dirfss - dict['creator'], dict['type'] = self.gusi.load() - flags = self.popt.load() - dict['version'], dict['inspect'], dict['verbose'], dict['optimize'], \ - dict['unbuffered'], dict['debugging'], dummy, dict['keep_console'], \ - dict['nointopt'], dict['noargs'], dict['tabwarn'], \ - dict['nosite'], dict['nonavservice'], dict['delayconsole'], \ - dict['divisionwarn'], dict['unixnewlines'] = flags - return dict - - def save(self, dict): - self.path.save(dict['path']) - diralias = macfs.FSSpec(dict['dir']).NewAlias().data - self.dir.save(diralias) - self.gusi.save((dict['creator'], dict['type'])) - flags = dict['version'], dict['inspect'], dict['verbose'], dict['optimize'], \ - dict['unbuffered'], dict['debugging'], 0, dict['keep_console'], \ - dict['nointopt'], dict['noargs'], dict['tabwarn'], \ - dict['nosite'], dict['nonavservice'], dict['delayconsole'], \ - dict['divisionwarn'], dict['unixnewlines'] - self.popt.save(flags) - -def AppletOptions(file): - fss = macfs.FSSpec(file) - a_popt = PoptLoader(ResLoader(fss, 'Popt', OVERRIDE_POPT_ID, default=popt_loader)) - a_dir = ResLoader(fss, 'alis', OVERRIDE_DIR_ID, default=dir) - a_gusi = GusiLoader( - ResLoader(fss, 'GU\267I', OVERRIDE_GUSI_ID, default=gusi_loader)) - a_path = StrListLoader( - ResLoader(fss, 'STR#', OVERRIDE_PATH_ID, default=path_loader)) - return PythonOptions(a_popt, a_dir, a_gusi, a_path) - -def _test(): - import preferences - preferences.debug = 1 - dict = PythonOptions().load() - for k in dict.keys(): - print k, '\t', dict[k] - -if __name__ == '__main__': - _test() - diff --git a/Mac/Lib/quietconsole.py b/Mac/Lib/quietconsole.py deleted file mode 100644 index 21e7755..0000000 --- a/Mac/Lib/quietconsole.py +++ /dev/null @@ -1,110 +0,0 @@ -"""quietconsole - A module to keep console I/O quiet but dump it when needed""" -import types -import sys - -class _PseudoStdin: - def __init__(self, stdouterr): - self.keep_stdin = sys.stdin - sys.stdin = self - self.keep_stdouterr = stdouterr - - def __del__(self): - self.keep_stdin = self.keep_stdouterr = None - - def _revert(self): - """Return to old state, with true stdio""" - if self.keep_stdin == None: - return - sys.stdin = self.keep_stdin - self.keep_stdin = None - self.keep_stdouterr._revert(1) - self.keep_stdouterr = None - - def read(self, *args): - self._revert() - return apply(sys.stdin.read, args) - - def readlines(self, *args): - self._revert() - return apply(sys.stdin.readlines, args) - - def readline(self, *args): - self._revert() - return apply(sys.stdin.readline, args) - - def close(self): - self._revert() - sys.stdin.close() - -class _PseudoStdouterr: - def __init__(self): - self.keep_stdout = sys.stdout - self.keep_stderr = sys.stderr - sys.stdout = sys.stderr = self - self.data = [] - - def __del__(self): - self.keep_stdout = self.keep_stderr = None - - def _revert(self, dumpdata=0): - if self.keep_stdout == None: - return - sys.stdout = self.keep_stdout - sys.stderr = self.keep_stderr - sys.keep_stdout = self.keep_stderr = None - if dumpdata and self.data: - for d in self.data: - sys.stdout.write(d) - self.data = None - - def write(self, arg): - self.data.append(arg) - - def writelines(self, arg): - for d in arg: - self.data.append(arg) - - def close(self): - self.keep_stdout = self.keep_stderr = self.data = None - -beenhere = 0 - -def install(): - global beenhere - if beenhere: - return - beenhere = 1 - # There's no point in re-installing if the console has been active - obj = _PseudoStdouterr() - _PseudoStdin(obj) - # No need to keep the objects, they're saved in sys.std{in,out,err} - -def revert(): - if type(sys.stdin) == types.FileType: - return # Not installed - sys.stdin._revert() - -def _test(): - import time - install() - print "You will not see this yet" - time.sleep(1) - print "You will not see this yet" - time.sleep(1) - print "You will not see this yet" - time.sleep(1) - print "You will not see this yet" - time.sleep(1) - print "You will not see this yet" - time.sleep(1) - print "5 seconds have passed, now you may type something" - rv = sys.stdin.readline() - print "You typed", rv - -if __name__ == '__main__': - _test() - - - - - diff --git a/Mac/Lib/test/AEservertest.py b/Mac/Lib/test/AEservertest.py deleted file mode 100644 index d474f43..0000000 --- a/Mac/Lib/test/AEservertest.py +++ /dev/null @@ -1,207 +0,0 @@ -"""AEservertest - Test AppleEvent server interface - -(adapted from Guido's 'echo' program). - -Build an applet from this source, and include the aete resource that you -want to test. Use the AEservertest script to try things. -""" - -import sys -sys.stdout = sys.stderr -import traceback -import MacOS -from Carbon import AE -from Carbon.AppleEvents import * -from Carbon import Evt -from Carbon.Events import * -from Carbon import Menu -from Carbon import Dlg -from Carbon import Win -from Carbon.Windows import * -from Carbon import Qd -import macfs - -import aetools -import EasyDialogs - -kHighLevelEvent = 23 # Not defined anywhere for Python yet? - -Quit='Quit' - -def mymessage(str): - err = AE.AEInteractWithUser(kAEDefaultTimeout) - if err: - print str - EasyDialogs.Message(str) - -def myaskstring(str, default=''): - err = AE.AEInteractWithUser(kAEDefaultTimeout) - if err: - return default - return EasyDialogs.AskString(str, default) - -def main(): - echo = EchoServer() - savepars = MacOS.SchedParams(0, 0) # Disable Python's own "event handling" - try: - try: - echo.mainloop(everyEvent, 0) - except Quit: - pass - finally: - apply(MacOS.SchedParams, savepars) # Let Python have a go at events - echo.close() - - -class EchoServer: - - suites = ['aevt', 'core', 'reqd'] - - def __init__(self): - self.active = 0 - # - # Install the handlers - # - for suite in self.suites: - AE.AEInstallEventHandler(suite, typeWildCard, self.aehandler) - print (suite, typeWildCard, self.aehandler) - self.active = 1 - # - # Setup the apple menu and file/quit - # - self.appleid = 1 - self.fileid = 2 - - Menu.ClearMenuBar() - self.applemenu = applemenu = Menu.NewMenu(self.appleid, "\024") - applemenu.AppendMenu("All about echo...;(-") - applemenu.InsertMenu(0) - - self.filemenu = Menu.NewMenu(self.fileid, 'File') - self.filemenu.AppendMenu("Quit/Q") - self.filemenu.InsertMenu(0) - - Menu.DrawMenuBar() - # - # Set interaction allowed (for the return values) - # - AE.AESetInteractionAllowed(kAEInteractWithAll) - - def __del__(self): - self.close() - - def close(self): - if self.active: - self.active = 0 - for suite in self.suites: - AE.AERemoveEventHandler(suite, typeWildCard) - - def mainloop(self, mask = everyEvent, timeout = 60*60): - while 1: - self.dooneevent(mask, timeout) - - def dooneevent(self, mask = everyEvent, timeout = 60*60): - got, event = Evt.WaitNextEvent(mask, timeout) - if got: - self.lowlevelhandler(event) - - def lowlevelhandler(self, event): - what, message, when, where, modifiers = event - h, v = where - if what == kHighLevelEvent: - msg = "High Level Event: %s %s" % \ - (`code(message)`, `code(h | (v<<16))`) - self.handled_by_us = 0 - try: - AE.AEProcessAppleEvent(event) - except AE.Error, err: - mymessage(msg + "\015AEProcessAppleEvent error: %s" % str(err)) - traceback.print_exc() - else: - if self.handled_by_us == 0: - print msg, "Handled by AE, somehow" - else: - print msg, 'Handled by us.' - elif what == keyDown: - c = chr(message & charCodeMask) - if modifiers & cmdKey: - if c == '.': - raise KeyboardInterrupt, "Command-period" - else: - self.menuhit(Menu.MenuKey(message&charCodeMask)) - ##MacOS.HandleEvent(event) - elif what == mouseDown: - partcode, window = Win.FindWindow(where) - if partcode == inMenuBar: - result = Menu.MenuSelect(where) - self.menuhit(result) - elif what <> autoKey: - print "Event:", (eventname(what), message, when, (h, v), modifiers) -## MacOS.HandleEvent(event) - - def menuhit(self, result): - id = (result>>16) & 0xffff # Hi word - item = result & 0xffff # Lo word - if id == self.appleid: - if item == 1: - mymessage("Echo -- echo AppleEvents") - elif id == self.fileid: - if item == 1: - raise Quit - - def aehandler(self, request, reply): - print "Apple Event!" - self.handled_by_us = 1 - parameters, attributes = aetools.unpackevent(request) - print "class =", `attributes['evcl'].type`, - print "id =", `attributes['evid'].type` - print "Parameters:" - keys = parameters.keys() - keys.sort() - for key in keys: - print "%s: %.150s" % (`key`, `parameters[key]`) - print " :", str(parameters[key]) - print "Attributes:" - keys = attributes.keys() - keys.sort() - for key in keys: - print "%s: %.150s" % (`key`, `attributes[key]`) - parameters['----'] = self.askreplyvalue() - aetools.packevent(reply, parameters) - - def askreplyvalue(self): - while 1: - str = myaskstring('Reply value to send (python-style)', 'None') - try: - rv = eval(str) - break - except: - pass - return rv - -_eventnames = { - keyDown: 'keyDown', - autoKey: 'autoKey', - mouseDown: 'mouseDown', - mouseUp: 'mouseUp', - updateEvt: 'updateEvt', - diskEvt: 'diskEvt', - activateEvt: 'activateEvt', - osEvt: 'osEvt', -} - -def eventname(what): - if _eventnames.has_key(what): return _eventnames[what] - else: return `what` - -def code(x): - "Convert a long int to the 4-character code it really is" - s = '' - for i in range(4): - x, c = divmod(x, 256) - s = chr(c) + s - return s - - -if __name__ == '__main__': - main() diff --git a/Mac/Lib/test/AEservertest.rsrc b/Mac/Lib/test/AEservertest.rsrc Binary files differdeleted file mode 100644 index 268bc27..0000000 --- a/Mac/Lib/test/AEservertest.rsrc +++ /dev/null diff --git a/Mac/Lib/test/aete.py b/Mac/Lib/test/aete.py deleted file mode 100644 index 3945a86..0000000 --- a/Mac/Lib/test/aete.py +++ /dev/null @@ -1,475 +0,0 @@ -# Look for scriptable applications -- that is, applications with an 'aete' resource -# Also contains (partially) reverse engineered 'aete' resource decoding - -import MacOS -import os -import string -import sys -import types -import StringIO - -from Carbon.Res import * - -def main(): - filename = "" - redirect(filename, realmain) - -def redirect(filename, func, *args): - f = filename and open(filename, 'w') - save_stdout = sys.stdout - try: - if f: sys.stdout = f - return apply(func, args) - finally: - sys.stdout = save_stdout - if f: f.close() - -def realmain(): - #list('C:System Folder:Extensions:AppleScript\252') - #list('C:Tao AppleScript:Finder Liaison:Finder Liaison 1.0') - list('C:Tao AppleScript:Scriptable Text Editor') - #list('C:Internet:Eudora 1.4.2:Eudora1.4.2') - #list('E:Excel 4.0:Microsoft Excel') - #list('C:Internet:Netscape 1.0N:Netscape 1.0N') - #find('C:') - #find('D:') - #find('E:') - #find('F:') - -def find(dir, maxlevel = 5): - hits = [] - cur = CurResFile() - names = os.listdir(dir) - tuples = map(lambda x: (os.path.normcase(x), x), names) - tuples.sort() - names = map(lambda (x, y): y, tuples) - for name in names: - if name in (os.curdir, os.pardir): continue - fullname = os.path.join(dir, name) - if os.path.islink(fullname): - pass - if os.path.isdir(fullname): - if maxlevel > 0: - sys.stderr.write(" %s\n" % `fullname`) - hits = hits + find(fullname, maxlevel-1) - else: - ctor, type = MacOS.GetCreatorAndType(fullname) - if type in ('APPL', 'FNDR', 'zsys', 'INIT', 'scri', 'cdev'): - sys.stderr.write(" %s\n" % `fullname`) - try: - rf = OpenRFPerm(fullname, 0, '\1') - except MacOS.Error, msg: - print "Error:", fullname, msg - continue - UseResFile(rf) - n = Count1Resources('aete') - if rf <> cur: - CloseResFile(rf) - UseResFile(cur) - if n > 1: - hits.append(fullname) - sys.stderr.write("YES! %d in %s\n" % (n, `fullname`)) - list(fullname) - return hits - -def list(fullname): - cur = CurResFile() - rf = OpenRFPerm(fullname, 0, '\1') - try: - UseResFile(rf) - resources = [] - for i in range(Count1Resources('aete')): - res = Get1IndResource('aete', 1+i) - resources.append(res) - for i in range(Count1Resources('aeut')): - res = Get1IndResource('aeut', 1+i) - resources.append(res) - print "\nLISTING aete+aeut RESOURCES IN", `fullname` - for res in resources: - print "decoding", res.GetResInfo(), "..." - data = res.data - try: - aete = decode(data) - showaete(aete) - print "Checking putaete..." - f = StringIO.StringIO() - putaete(f, aete) - newdata = f.getvalue() - if len(newdata) == len(data): - if newdata == data: - print "putaete created identical data" - else: - newaete = decode(newdata) - if newaete == aete: - print "putaete created equivalent data" - else: - print "putaete failed the test:" - showaete(newaete) - else: - print "putaete created different data:" - print `newdata` - except: - import traceback - traceback.print_exc() - sys.stdout.flush() - finally: - if rf <> cur: - CloseResFile(rf) - UseResFile(cur) - -def decode(data): - f = StringIO.StringIO(data) - aete = generic(getaete, f) - aete = simplify(aete) - processed = f.tell() - unprocessed = len(f.read()) - total = f.tell() - if unprocessed: - sys.stderr.write("%d processed + %d unprocessed = %d total\n" % - (processed, unprocessed, total)) - return aete - -def simplify(item): - if type(item) is types.ListType: - return map(simplify, item) - elif type(item) == types.TupleType and len(item) == 2: - return simplify(item[1]) - else: - return item - - -# Here follows the aete resource decoder. -# It is presented bottom-up instead of top-down because there are direct -# references to the lower-level part-decoders from the high-level part-decoders. - -def getbyte(f, *args): - c = f.read(1) - if not c: - raise EOFError, 'in getbyte' + str(args) - return ord(c) - -def getword(f, *args): - getalign(f) - s = f.read(2) - if len(s) < 2: - raise EOFError, 'in getword' + str(args) - return (ord(s[0])<<8) | ord(s[1]) - -def getlong(f, *args): - getalign(f) - s = f.read(4) - if len(s) < 4: - raise EOFError, 'in getlong' + str(args) - return (ord(s[0])<<24) | (ord(s[1])<<16) | (ord(s[2])<<8) | ord(s[3]) - -def getostype(f, *args): - getalign(f) - s = f.read(4) - if len(s) < 4: - raise EOFError, 'in getostype' + str(args) - return s - -def getpstr(f, *args): - c = f.read(1) - if len(c) < 1: - raise EOFError, 'in getpstr[1]' + str(args) - nbytes = ord(c) - if nbytes == 0: return '' - s = f.read(nbytes) - if len(s) < nbytes: - raise EOFError, 'in getpstr[2]' + str(args) - return s - -def getalign(f): - if f.tell() & 1: - c = f.read(1) - ##if c <> '\0': - ## print 'align:', `c` - -def getlist(f, description, getitem): - count = getword(f) - list = [] - for i in range(count): - list.append(generic(getitem, f)) - getalign(f) - return list - -def alt_generic(what, f, *args): - print "generic", `what`, args - res = vageneric(what, f, args) - print '->', `res` - return res - -def generic(what, f, *args): - if type(what) == types.FunctionType: - return apply(what, (f,) + args) - if type(what) == types.ListType: - record = [] - for thing in what: - item = apply(generic, thing[:1] + (f,) + thing[1:]) - record.append((thing[1], item)) - return record - return "BAD GENERIC ARGS: %s" % `what` - -getdata = [ - (getostype, "type"), - (getpstr, "description"), - (getword, "flags") - ] -getargument = [ - (getpstr, "name"), - (getostype, "keyword"), - (getdata, "what") - ] -getevent = [ - (getpstr, "name"), - (getpstr, "description"), - (getostype, "suite code"), - (getostype, "event code"), - (getdata, "returns"), - (getdata, "accepts"), - (getlist, "optional arguments", getargument) - ] -getproperty = [ - (getpstr, "name"), - (getostype, "code"), - (getdata, "what") - ] -getelement = [ - (getostype, "type"), - (getlist, "keyform", getostype) - ] -getclass = [ - (getpstr, "name"), - (getostype, "class code"), - (getpstr, "description"), - (getlist, "properties", getproperty), - (getlist, "elements", getelement) - ] -getcomparison = [ - (getpstr, "operator name"), - (getostype, "operator ID"), - (getpstr, "operator comment"), - ] -getenumerator = [ - (getpstr, "enumerator name"), - (getostype, "enumerator ID"), - (getpstr, "enumerator comment") - ] -getenumeration = [ - (getostype, "enumeration ID"), - (getlist, "enumerator", getenumerator) - ] -getsuite = [ - (getpstr, "suite name"), - (getpstr, "suite description"), - (getostype, "suite ID"), - (getword, "suite level"), - (getword, "suite version"), - (getlist, "events", getevent), - (getlist, "classes", getclass), - (getlist, "comparisons", getcomparison), - (getlist, "enumerations", getenumeration) - ] -getaete = [ - (getword, "major/minor version in BCD"), - (getword, "language code"), - (getword, "script code"), - (getlist, "suites", getsuite) - ] - - -# Display 'aete' resources in a friendly manner. -# This one's done top-down again... - -def showaete(aete): - [version, language, script, suites] = aete - major, minor = divmod(version, 256) - print "\nVersion %d/%d, language %d, script %d" % \ - (major, minor, language, script) - for suite in suites: - showsuite(suite) - -def showsuite(suite): - [name, desc, code, level, version, events, classes, comps, enums] = suite - print "\nSuite %s -- %s (%s)" % (`name`, `desc`, `code`) - print "Level %d, version %d" % (level, version) - for event in events: - showevent(event) - for cls in classes: - showclass(cls) - for comp in comps: - showcomparison(comp) - for enum in enums: - showenumeration(enum) - -def showevent(event): - [name, desc, code, subcode, returns, accepts, arguments] = event - print "\n Command %s -- %s (%s, %s)" % (`name`, `desc`, `code`, `subcode`) - print " returns", showdata(returns) - print " accepts", showdata(accepts) - for arg in arguments: - showargument(arg) - -def showargument(arg): - [name, keyword, what] = arg - print " %s (%s)" % (name, `keyword`), showdata(what) - -def showclass(cls): - [name, code, desc, properties, elements] = cls - print "\n Class %s (%s) -- %s" % (`name`, `code`, `desc`) - for prop in properties: - showproperty(prop) - for elem in elements: - showelement(elem) - -def showproperty(prop): - [name, code, what] = prop - print " property %s (%s)" % (`name`, `code`), showdata(what) - -def showelement(elem): - [code, keyform] = elem - print " element %s" % `code`, "as", keyform - -def showcomparison(comp): - [name, code, comment] = comp - print " comparison %s (%s) -- %s" % (`name`, `code`, comment) - -def showenumeration(enum): - [code, items] = enum - print "\n Enum %s" % `code` - for item in items: - showenumerator(item) - -def showenumerator(item): - [name, code, desc] = item - print " %s (%s) -- %s" % (`name`, `code`, `desc`) - -def showdata(data): - [type, description, flags] = data - return "%s -- %s %s" % (`type`, `description`, showdataflags(flags)) - -dataflagdict = {15: "optional", 14: "list", 13: "enum", 12: "mutable"} -def showdataflags(flags): - bits = [] - for i in range(16): - if flags & (1<<i): - if i in dataflagdict.keys(): - bits.append(dataflagdict[i]) - else: - bits.append(`i`) - return '[%s]' % string.join(bits) - - -# Write an 'aete' resource. -# Closedly modelled after showaete()... - -def putaete(f, aete): - [version, language, script, suites] = aete - putword(f, version) - putword(f, language) - putword(f, script) - putlist(f, suites, putsuite) - -def putsuite(f, suite): - [name, desc, code, level, version, events, classes, comps, enums] = suite - putpstr(f, name) - putpstr(f, desc) - putostype(f, code) - putword(f, level) - putword(f, version) - putlist(f, events, putevent) - putlist(f, classes, putclass) - putlist(f, comps, putcomparison) - putlist(f, enums, putenumeration) - -def putevent(f, event): - [name, desc, eventclass, eventid, returns, accepts, arguments] = event - putpstr(f, name) - putpstr(f, desc) - putostype(f, eventclass) - putostype(f, eventid) - putdata(f, returns) - putdata(f, accepts) - putlist(f, arguments, putargument) - -def putargument(f, arg): - [name, keyword, what] = arg - putpstr(f, name) - putostype(f, keyword) - putdata(f, what) - -def putclass(f, cls): - [name, code, desc, properties, elements] = cls - putpstr(f, name) - putostype(f, code) - putpstr(f, desc) - putlist(f, properties, putproperty) - putlist(f, elements, putelement) - -putproperty = putargument - -def putelement(f, elem): - [code, parts] = elem - putostype(f, code) - putlist(f, parts, putostype) - -def putcomparison(f, comp): - [name, id, comment] = comp - putpstr(f, name) - putostype(f, id) - putpstr(f, comment) - -def putenumeration(f, enum): - [code, items] = enum - putostype(f, code) - putlist(f, items, putenumerator) - -def putenumerator(f, item): - [name, code, desc] = item - putpstr(f, name) - putostype(f, code) - putpstr(f, desc) - -def putdata(f, data): - [type, description, flags] = data - putostype(f, type) - putpstr(f, description) - putword(f, flags) - -def putlist(f, list, putitem): - putword(f, len(list)) - for item in list: - putitem(f, item) - putalign(f) - -def putalign(f): - if f.tell() & 1: - f.write('\0') - -def putbyte(f, value): - f.write(chr(value)) - -def putword(f, value): - putalign(f) - f.write(chr((value>>8)&0xff)) - f.write(chr(value&0xff)) - -def putostype(f, value): - putalign(f) - if type(value) != types.StringType or len(value) != 4: - raise TypeError, "ostype must be 4-char string" - f.write(value) - -def putpstr(f, value): - if type(value) != types.StringType or len(value) > 255: - raise TypeError, "pstr must be string <= 255 chars" - f.write(chr(len(value)) + value) - - -# Call the main program - -if __name__ == '__main__': - main() -else: - realmain() diff --git a/Mac/Lib/test/cmtest.py b/Mac/Lib/test/cmtest.py deleted file mode 100644 index bdbca23..0000000 --- a/Mac/Lib/test/cmtest.py +++ /dev/null @@ -1,45 +0,0 @@ -"""cmtest - List all components in the system""" - -from Carbon import Cm -from Carbon import Res -from Carbon import sys - -def getstr255(r): - """Get string from str255 resource""" - if not r.data: return '' - len = ord(r.data[0]) - return r.data[1:1+len] - -def getinfo(c): - """Return (type, subtype, creator, fl1, fl2, name, description) for component""" - h1 = Res.Resource('') - h2 = Res.Resource('') - h3 = Res.Resource('') - type, subtype, creator, fl1, fl2 = c.GetComponentInfo(h1, h2, h3) - name = getstr255(h1) - description = getstr255(h2) - return type, subtype, creator, fl1, fl2, name, description - -def getallcomponents(): - """Return list with info for all components, sorted""" - any = ('\0\0\0\0', '\0\0\0\0', '\0\0\0\0', 0, 0) - c = None - rv = [] - while 1: - try: - c = Cm.FindNextComponent(c, any) - except Cm.Error: - break - rv.append(getinfo(c)) - rv.sort() - return rv - -def main(): - """Print info for all components""" - info = getallcomponents() - for type, subtype, creator, f1, f2, name, description in info: - print '%4.4s %4.4s %4.4s %s 0x%x 0x%x'%(type, subtype, creator, name, f1, f2) - print ' ', description - sys.exit(1) - -main() diff --git a/Mac/Lib/test/ctbtest.py b/Mac/Lib/test/ctbtest.py deleted file mode 100644 index 91824d3..0000000 --- a/Mac/Lib/test/ctbtest.py +++ /dev/null @@ -1,50 +0,0 @@ -# -# Simple test program for ctb module: emulate a terminal. -# To simplify matters use the python console window for output. -# -import ctb -from Carbon import Evt -from Carbon import Events -import MacOS -import sys - -def cb(err): - print 'Done, err=', err - -def main(): - if not ctb.available(): - print 'Communications Toolbox not available' - sys.exit(1) - # Disable Python's event processing (we do that) - MacOS.SchedParams(1, 0) - print 'Minimal terminal emulator V1.0' - print '(type command-Q to exit)' - print - - l = ctb.CMNew('Serial Tool', None) - l.Open(10) - l.SetConfig(l.GetConfig() + ' baud 4800') - - while 1: - l.Idle() # Give time to ctb - - ok, evt = Evt.WaitNextEvent(0xffff, 0) - if ok: - what, message, when, where, modifiers = evt - - if what == Events.keyDown: - # It is ours. Check for command-. to terminate - ch = chr(message & Events.charCodeMask) - if ch == 'q' and (modifiers & Events.cmdKey): - break - l.Write(ch, ctb.cmData, -1, 0) - d, dummy = l.Read(1000, ctb.cmData, 1) - if d: - for ch in d: - if ch != '\r': - sys.stdout.write(ch) - sys.stdout.flush() - l.Close(-1, 1) - del l - -main() diff --git a/Mac/Lib/test/dragtest.py b/Mac/Lib/test/dragtest.py deleted file mode 100644 index 28eb1a9..0000000 --- a/Mac/Lib/test/dragtest.py +++ /dev/null @@ -1,43 +0,0 @@ -from Carbon import Drag -import time -xxxx=1 -def decode_hfs(data): - import struct, macfs - tp = data[0:4] - cr = data[4:8] - flags = struct.unpack("h", data[8:10]) - fss = macfs.RawFSSpec(data[10:]) - return tp, cr, flags, fss - -def tracker(msg, dragref, window): - pass - -def dropper(dragref, window): - global xxxx - n = dragref.CountDragItems() - print 'Drop %d items:'%n - for i in range(1, n+1): - refnum = dragref.GetDragItemReferenceNumber(i) - print '%d (ItemReference 0x%x)'%(i, refnum) - nf = dragref.CountDragItemFlavors(refnum) - print ' %d flavors:'%nf - for j in range(1, nf+1): - ftype = dragref.GetFlavorType(refnum, j) - fflags = dragref.GetFlavorFlags(refnum, ftype) - print ' "%4.4s" 0x%x'%(ftype, fflags) - if ftype == 'hfs ': - datasize = dragref.GetFlavorDataSize(refnum, ftype) - data = dragref.GetFlavorData(refnum, ftype, datasize, 0) - print ' datasize', `data` - xxxx = data - print ' ->', decode_hfs(data) - - -def main(): - print "Drag things onto output window. Press command-. to quit." - Drag.InstallTrackingHandler(tracker) - Drag.InstallReceiveHandler(dropper) - while 1: - time.sleep(100) - -main() diff --git a/Mac/Lib/test/echo.py b/Mac/Lib/test/echo.py deleted file mode 100644 index f84e13b..0000000 --- a/Mac/Lib/test/echo.py +++ /dev/null @@ -1,155 +0,0 @@ -"""'echo' -- an AppleEvent handler which handles all events the same. - -It replies to each event by echoing the parameter back to the client. -This is a good way to find out how the Script Editor formats AppleEvents, -especially to figure out all the different forms an object specifier -can have (without having to rely on Apple's implementation). -""" - -import sys -sys.stdout = sys.stderr -import traceback -import MacOS -from Carbon import AE -from Carbon.AppleEvents import * -from Carbon import Evt -from Carbon.Events import * -from Carbon import Menu -from Carbon import Dlg -from Carbon import Win -from Carbon.Windows import * -from Carbon import Qd - -import aetools -import EasyDialogs - -kHighLevelEvent = 23 # Not defined anywhere for Python yet? - -def mymessage(str): - err = AE.AEInteractWithUser(kAEDefaultTimeout) - if err: - print str - EasyDialogs.Message(str) - -def main(): - echo = EchoServer() - saveparams = MacOS.SchedParams(0, 0) # Disable Python's own "event handling" - try: - echo.mainloop(everyEvent, 0) - finally: - apply(MacOS.SchedParams, saveparams) # Let Python have a go at events - echo.close() - - -class EchoServer: - - #suites = ['aevt', 'core', 'reqd'] - suites = ['****'] - - def __init__(self): - self.active = 0 - for suite in self.suites: - AE.AEInstallEventHandler(suite, typeWildCard, self.aehandler) - print (suite, typeWildCard, self.aehandler) - self.active = 1 - self.appleid = 1 - Menu.ClearMenuBar() - self.applemenu = applemenu = Menu.NewMenu(self.appleid, "\024") - applemenu.AppendMenu("All about echo...;(-") - applemenu.InsertMenu(0) - Menu.DrawMenuBar() - - def __del__(self): - self.close() - - def close(self): - if self.active: - self.active = 0 - for suite in self.suites: - AE.AERemoveEventHandler(suite, typeWildCard) - - def mainloop(self, mask = everyEvent, timeout = 60*60): - while 1: - self.dooneevent(mask, timeout) - - def dooneevent(self, mask = everyEvent, timeout = 60*60): - got, event = Evt.WaitNextEvent(mask, timeout) - if got: - self.lowlevelhandler(event) - - def lowlevelhandler(self, event): - what, message, when, where, modifiers = event - h, v = where - if what == kHighLevelEvent: - msg = "High Level Event: %s %s" % \ - (`code(message)`, `code(h | (v<<16))`) - try: - AE.AEProcessAppleEvent(event) - except AE.Error, err: - mymessage(msg + "\015AEProcessAppleEvent error: %s" % str(err)) - traceback.print_exc() - else: - mymessage(msg + "\015OK!") - elif what == keyDown: - c = chr(message & charCodeMask) - if c == '.' and modifiers & cmdKey: - raise KeyboardInterrupt, "Command-period" - MacOS.HandleEvent(event) - elif what == mouseDown: - partcode, window = Win.FindWindow(where) - if partcode == inMenuBar: - result = Menu.MenuSelect(where) - id = (result>>16) & 0xffff # Hi word - item = result & 0xffff # Lo word - if id == self.appleid: - if item == 1: - mymessage("Echo -- echo AppleEvents") - elif what <> autoKey: - print "Event:", (eventname(what), message, when, (h, v), modifiers) -## MacOS.HandleEvent(event) - - def aehandler(self, request, reply): - print "Apple Event!" - parameters, attributes = aetools.unpackevent(request) - print "class =", `attributes['evcl'].type`, - print "id =", `attributes['evid'].type` - print "Parameters:" - keys = parameters.keys() - keys.sort() - for key in keys: - print "%s: %.150s" % (`key`, `parameters[key]`) - print " :", str(parameters[key]) - print "Attributes:" - keys = attributes.keys() - keys.sort() - for key in keys: - print "%s: %.150s" % (`key`, `attributes[key]`) - aetools.packevent(reply, parameters) - - -_eventnames = { - keyDown: 'keyDown', - autoKey: 'autoKey', - mouseDown: 'mouseDown', - mouseUp: 'mouseUp', - updateEvt: 'updateEvt', - diskEvt: 'diskEvt', - activateEvt: 'activateEvt', - osEvt: 'osEvt', -} - -def eventname(what): - if _eventnames.has_key(what): return _eventnames[what] - else: return `what` - -def code(x): - "Convert a long int to the 4-character code it really is" - s = '' - for i in range(4): - x, c = divmod(x, 256) - s = chr(c) + s - return s - - -if __name__ == '__main__': - main() diff --git a/Mac/Lib/test/fgbgtimetest.py b/Mac/Lib/test/fgbgtimetest.py deleted file mode 100644 index fd2b649..0000000 --- a/Mac/Lib/test/fgbgtimetest.py +++ /dev/null @@ -1,17 +0,0 @@ -"""fgbgtest - See how many CPU cycles we get""" - -import time - -loopct = 0L -oldloopct = 0L -oldt = time.time() - -while 1: - t = time.time() - if t - oldt >= 1: - if oldloopct: - print loopct-oldloopct,'in one second' - oldloopct = loopct - oldt = time.time() - loopct = loopct + 1 - diff --git a/Mac/Lib/test/icgluetest.py b/Mac/Lib/test/icgluetest.py deleted file mode 100644 index dd34bd0..0000000 --- a/Mac/Lib/test/icgluetest.py +++ /dev/null @@ -1,28 +0,0 @@ -"""Test icglue module by printing all preferences. Note that the ic module, -not the icglue module, is what you should normally use.""" - -import icglue -from Carbon import Res - -ici = icglue.ICStart('Pyth') -#ici.ICFindConfigFile() -h = Res.Resource("") - -ici.ICBegin(1) -numprefs = ici.ICCountPref() -print "Number of preferences:", numprefs - -for i in range(1, numprefs+1): - key = ici.ICGetIndPref(i) - print "Key: ", key - - h.data = "" - attrs = ici.ICFindPrefHandle(key, h) - print "Attr: ", attrs - print "Data: ", `h.data[:64]` - -ici.ICEnd() -del ici - -import sys -sys.exit(1) diff --git a/Mac/Lib/test/mkcwproj/mkcwtestmodule.c b/Mac/Lib/test/mkcwproj/mkcwtestmodule.c deleted file mode 100644 index 84d0e2d..0000000 --- a/Mac/Lib/test/mkcwproj/mkcwtestmodule.c +++ /dev/null @@ -1,211 +0,0 @@ - -/* Use this file as a template to start implementing a module that - also declares object types. All occurrences of 'Xxo' should be changed - to something reasonable for your objects. After that, all other - occurrences of 'xx' should be changed to something reasonable for your - module. If your module is named foo your sourcefile should be named - foomodule.c. - - You will probably want to delete all references to 'x_attr' and add - your own types of attributes instead. Maybe you want to name your - local variables other than 'self'. If your object type is needed in - other files, you'll have to create a file "foobarobject.h"; see - intobject.h for an example. */ - -/* Xxo objects */ - -#include "Python.h" - -static PyObject *ErrorObject; - -typedef struct { - PyObject_HEAD - PyObject *x_attr; /* Attributes dictionary */ -} XxoObject; - -static PyTypeObject Xxo_Type; - -#define XxoObject_Check(v) ((v)->ob_type == &Xxo_Type) - -static XxoObject * -newXxoObject(PyObject *arg) -{ - XxoObject *self; - self = PyObject_New(XxoObject, &Xxo_Type); - if (self == NULL) - return NULL; - self->x_attr = NULL; - return self; -} - -/* Xxo methods */ - -static void -Xxo_dealloc(XxoObject *self) -{ - Py_XDECREF(self->x_attr); - PyObject_Del(self); -} - -static PyObject * -Xxo_demo(XxoObject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, ":demo")) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - -static PyMethodDef Xxo_methods[] = { - {"demo", (PyCFunction)Xxo_demo, METH_VARARGS}, - {NULL, NULL} /* sentinel */ -}; - -static PyObject * -Xxo_getattr(XxoObject *self, char *name) -{ - if (self->x_attr != NULL) { - PyObject *v = PyDict_GetItemString(self->x_attr, name); - if (v != NULL) { - Py_INCREF(v); - return v; - } - } - return Py_FindMethod(Xxo_methods, (PyObject *)self, name); -} - -static int -Xxo_setattr(XxoObject *self, char *name, PyObject *v) -{ - if (self->x_attr == NULL) { - self->x_attr = PyDict_New(); - if (self->x_attr == NULL) - return -1; - } - if (v == NULL) { - int rv = PyDict_DelItemString(self->x_attr, name); - if (rv < 0) - PyErr_SetString(PyExc_AttributeError, - "delete non-existing Xxo attribute"); - return rv; - } - else - return PyDict_SetItemString(self->x_attr, name, v); -} - -statichere PyTypeObject Xxo_Type = { - /* The ob_type field must be initialized in the module init function - * to be portable to Windows without using C++. */ - PyObject_HEAD_INIT(NULL) - 0, /*ob_size*/ - "Xxmodule.Xxo", /*tp_name*/ - sizeof(XxoObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - (destructor)Xxo_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - (getattrfunc)Xxo_getattr, /*tp_getattr*/ - (setattrfunc)Xxo_setattr, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ -}; -/* --------------------------------------------------------------------- */ - -/* Function of two integers returning integer */ - -static PyObject * -xx_foo(PyObject *self, PyObject *args) -{ - long i, j; - long res; - if (!PyArg_ParseTuple(args, "ll:foo", &i, &j)) - return NULL; - res = i+j; /* XXX Do something here */ - return PyInt_FromLong(res); -} - - -/* Function of no arguments returning new Xxo object */ - -static PyObject * -xx_new(PyObject *self, PyObject *args) -{ - XxoObject *rv; - - if (!PyArg_ParseTuple(args, ":new")) - return NULL; - rv = newXxoObject(args); - if ( rv == NULL ) - return NULL; - return (PyObject *)rv; -} - -/* Example with subtle bug from extensions manual ("Thin Ice"). */ - -static PyObject * -xx_bug(PyObject *self, PyObject *args) -{ - PyObject *list, *item; - - if (!PyArg_ParseTuple(args, "O:bug", &list)) - return NULL; - - item = PyList_GetItem(list, 0); - /* Py_INCREF(item); */ - PyList_SetItem(list, 1, PyInt_FromLong(0L)); - PyObject_Print(item, stdout, 0); - printf("\n"); - /* Py_DECREF(item); */ - - Py_INCREF(Py_None); - return Py_None; -} - -/* Test bad format character */ - -static PyObject * -xx_roj(PyObject *self, PyObject *args) -{ - PyObject *a; - long b; - if (!PyArg_ParseTuple(args, "O#:roj", &a, &b)) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} - - -/* List of functions defined in the module */ - -static PyMethodDef xx_methods[] = { - {"roj", xx_roj, METH_VARARGS}, - {"foo", xx_foo, METH_VARARGS}, - {"new", xx_new, METH_VARARGS}, - {"bug", xx_bug, METH_VARARGS}, - {NULL, NULL} /* sentinel */ -}; - - -/* Initialization function for the module (*must* be called initxx) */ - -DL_EXPORT(void) -initmkcwtest(void) -{ - PyObject *m, *d; - - /* Initialize the type of the new type object here; doing it here - * is required for portability to Windows without requiring C++. */ - Xxo_Type.ob_type = &PyType_Type; - - /* Create the module and add the functions */ - m = Py_InitModule("mkcwtest", xx_methods); - - /* Add some symbolic constants to the module */ - d = PyModule_GetDict(m); - ErrorObject = PyErr_NewException("xx.error", NULL, NULL); - PyDict_SetItemString(d, "error", ErrorObject); -} diff --git a/Mac/Lib/test/mkcwproj/testmkcwproj.py b/Mac/Lib/test/mkcwproj/testmkcwproj.py deleted file mode 100644 index ac1cb8e..0000000 --- a/Mac/Lib/test/mkcwproj/testmkcwproj.py +++ /dev/null @@ -1,12 +0,0 @@ -import mkcwproject -import sys - -dict = { - "sysprefix": sys.prefix, - "sources": ["mkcwtestmodule.c"], - "extrasearchdirs": [], -} - - -mkcwproject.mkproject("mkcwtest.prj", "mkcwtest", dict) -mkcwproject.buildproject("mkcwtest.prj") diff --git a/Mac/Lib/test/readme.txt b/Mac/Lib/test/readme.txt deleted file mode 100644 index dbf671f..0000000 --- a/Mac/Lib/test/readme.txt +++ /dev/null @@ -1,4 +0,0 @@ -The files in this folder are not maintained very well. They have worked at some -point in the past, but they may not work anymore. They may contain interesting -information, but they could also very well contain misinformation. Use at your -own risk. diff --git a/Mac/Lib/test/tell.py b/Mac/Lib/test/tell.py deleted file mode 100644 index fcacb7e..0000000 --- a/Mac/Lib/test/tell.py +++ /dev/null @@ -1,63 +0,0 @@ -# (Slightly less) primitive operations for sending Apple Events to applications. -# This could be the basis of a Script Editor like application. - -from Carbon.AE import * -from Carbon.AppleEvents import * -import aetools -import types - -class TalkTo: - def __init__(self, signature): - """Create a communication channel with a particular application. - - For now, the application must be given by its 4-character signature - (because I don't know yet how to do other target types). - """ - if type(signature) != types.StringType or len(signature) != 4: - raise TypeError, "signature should be 4-char string" - self.target = AECreateDesc(typeApplSignature, signature) - self.send_flags = kAEWaitReply - self.send_priority = kAENormalPriority - self.send_timeout = kAEDefaultTimeout - def newevent(self, code, subcode, parameters = {}, attributes = {}): - event = AECreateAppleEvent(code, subcode, self.target, - kAutoGenerateReturnID, kAnyTransactionID) - aetools.packevent(event, parameters, attributes) - return event - def sendevent(self, event): - reply = event.AESend(self.send_flags, self.send_priority, - self.send_timeout) - parameters, attributes = aetools.unpackevent(reply) - return reply, parameters, attributes - - def send(self, code, subcode, parameters = {}, attributes = {}): - return self.sendevent(self.newevent(code, subcode, parameters, attributes)) - - def activate(self): - # Send undocumented but easily reverse engineered 'activate' command - self.send('misc', 'actv') - - -# This object is equivalent to "selection" in AppleScript -# (in the core suite, if that makes a difference): -get_selection = aetools.Property('sele', None) - -# Test program. You can make it do what you want by passing parameters. -# The default gets the selection from Quill (Scriptable Text Editor). - -def test(app = 'quil', suite = 'core', id = 'getd', arg = get_selection): - t = TalkTo(app) - t.activate() - if arg: - dict = {'----': arg} - else: - dict = {} - reply, parameters, attributes = t.send(suite, id, dict) - print reply, parameters - if parameters.has_key('----'): print "returns:", str(parameters['----']) - - -test() -# So we can see it: -import sys -sys.exit(1) diff --git a/Mac/Lib/test/test_finder_ae b/Mac/Lib/test/test_finder_ae deleted file mode 100644 index b6241a2..0000000 --- a/Mac/Lib/test/test_finder_ae +++ /dev/null @@ -1,5 +0,0 @@ -tell application "AEservertest" - activate - set x to window "testing" - open file x -end tell diff --git a/Mac/Lib/test/test_setcontroldata.py b/Mac/Lib/test/test_setcontroldata.py deleted file mode 100644 index 8167214..0000000 --- a/Mac/Lib/test/test_setcontroldata.py +++ /dev/null @@ -1,13 +0,0 @@ -import W -from Carbon.Controls import * - -w = W.Window((200,200), "Test") - -w.c = W.Button((5,5,100,50), "Test") - -w.open() - -print repr(w.c._control.GetControlData(0, 'dflt')) - -str = '\001' -w.c._control.SetControlData(0, 'dflt', str)
\ No newline at end of file diff --git a/Mac/Lib/test/tlist.py b/Mac/Lib/test/tlist.py deleted file mode 100644 index 5b84fc5..0000000 --- a/Mac/Lib/test/tlist.py +++ /dev/null @@ -1,92 +0,0 @@ -# Test List module. -# Draw a window with all the files in the current folder. -# double-clicking will change folder. -# -# This test expects Win, Evt and FrameWork (and anything used by those) -# to work. -# -# Actually, it is more a test of FrameWork by now.... - -from FrameWork import * -from Carbon import Win -from Carbon import Qd -from Carbon import List -from Carbon import Lists -import os - -class ListWindow(Window): - def open(self, name, where): - self.where = where - r = (40, 40, 400, 300) - w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555) - r2 = (0, 0, 345, 245) - Qd.SetPort(w) - self.wid = w - self.list = List.LNew(r2, (0, 0, 1, 1), (0,0), 0, w, 0, 1, 1, 1) - self.list.selFlags = Lists.lOnlyOne - self.filllist() - w.DrawGrowIcon() - self.do_postopen() - - def do_activate(self, onoff, evt): - self.list.LActivate(onoff) - - def do_update(self, *args): - self.list.LUpdate(self.wid.GetWindowPort().visRgn) - - def do_contentclick(self, local, modifiers, evt): - dclick = self.list.LClick(local, modifiers) - if dclick: - h, v = self.list.LLastClick() - file = self.list.LGetCell(1000, (h, v)) - self.where = os.path.join(self.where, file) - self.filllist() - - def filllist(self): - """Fill the list with the contents of the current directory""" - l = self.list - l.LSetDrawingMode(0) - l.LDelRow(0, 0) - contents = os.listdir(self.where) - l.LAddRow(len(contents), 0) - for i in range(len(contents)): - l.LSetCell(contents[i], (0, i)) - l.LSetDrawingMode(1) - l.LUpdate(self.wid.GetWindowPort().visRgn) - - -class TestList(Application): - def __init__(self): - Application.__init__(self) - self.num = 0 - self.listoflists = [] - - def makeusermenus(self): - self.filemenu = m = Menu(self.menubar, "File") - self.newitem = MenuItem(m, "New window...", "O", self.open) - self.quititem = MenuItem(m, "Quit", "Q", self.quit) - - def open(self, *args): - import macfs - fss, ok = macfs.GetDirectory() - if not ok: - return - w = ListWindow(self) - w.open('Window %d'%self.num, fss.as_pathname()) - self.num = self.num + 1 - self.listoflists.append(w) - - def quit(self, *args): - raise self - - def do_about(self, id, item, window, event): - EasyDialogs.Message("""Test the List Manager interface. - Simple inward-only folder browser""") - -def main(): - App = TestList() - App.mainloop() - -if __name__ == '__main__': - main() - diff --git a/Mac/Lib/test/tsnd.py b/Mac/Lib/test/tsnd.py deleted file mode 100644 index 919785a..0000000 --- a/Mac/Lib/test/tsnd.py +++ /dev/null @@ -1,18 +0,0 @@ -# Show off SndPlay (and some resource manager functions). -# Get a list of all 'snd ' resources in the system and play them all. - -from Carbon.Res import * -from Carbon.Snd import * - -ch = SndNewChannel(0, 0, None) -print "Channel:", ch - -type = 'snd ' - -for i in range(CountResources(type)): - r = GetIndResource(type, i+1) - print r.GetResInfo(), r.size - if r.GetResInfo()[0] == 1: - print "Skipping simple beep" - continue - ch.SndPlay(r, 0) diff --git a/Mac/Lib/test/tte.py b/Mac/Lib/test/tte.py deleted file mode 100644 index bde7de2..0000000 --- a/Mac/Lib/test/tte.py +++ /dev/null @@ -1,17 +0,0 @@ -# Test TE module, simple version - -from Carbon.Win import * -from Carbon.TE import * -from Carbon import Qd - -r = (40, 40, 140, 140) -w = NewWindow(r, "TETextBox test", 1, 0, -1, 1, 0x55555555) -##w.DrawGrowIcon() - -r = (10, 10, 90, 90) - -Qd.SetPort(w) -t = TETextBox("Nobody expects the SPANISH inquisition", r, 1) - -import time -time.sleep(10) diff --git a/Mac/Lib/test/twin.py b/Mac/Lib/test/twin.py deleted file mode 100644 index 0904d32..0000000 --- a/Mac/Lib/test/twin.py +++ /dev/null @@ -1,9 +0,0 @@ -# Test Win module - -from Win import * - -r = (40, 40, 400, 300) -w = NewWindow(r, "Hello world", 1, 0, -1, 1, 0x55555555) -w.DrawGrowIcon() -import time -time.sleep(10) |