Index: /trunk/appswitch/appswitch/README
===================================================================
--- /trunk/appswitch/appswitch/README	(revision 155)
+++ /trunk/appswitch/appswitch/README	(revision 156)
@@ -1,4 +1,4 @@
-appswitch 1.0 [19 February 2003]
-=============
+appswitch 1.0.1 [19 April 2004]
+===============
 
 A command-line interface to the Mac OS X process manager.
@@ -37,5 +37,5 @@
 Uninstallation:
 
-% sudo rm -f /usr/local/bin/appswitch
+% sudo rm -f /usr/local/bin/appswitch /usr/local/man/man1/appswitch.1
 
 COMPILATION
@@ -44,5 +44,5 @@
 A Project Builder project, 'appswitch.pbproj', is included.  A
 precompiled binary is also provided.  'appswitch' was developed and
-tested under Mac OS 10.2.4 with the December 2002 Developer Tools,
+tested under Mac OS 10.3.3 with the April 2004 Developer Tools,
 and does not require any additional software to build.
 
@@ -73,4 +73,6 @@
 ---------------
 
+1.0.1 - 19 April 2004
+- fixed crash matching applications with no bundle identifier
 1.0   - 19 February 2003
  - added description of -q delay bug (no workaround)
Index: /trunk/appswitch/appswitch/appswitch.1
===================================================================
--- /trunk/appswitch/appswitch/appswitch.1	(revision 155)
+++ /trunk/appswitch/appswitch/appswitch.1	(revision 156)
@@ -1,8 +1,8 @@
-.Dd Wed Feb 19 2003      \" DATE 
+.Dd Mon Apr 19 2004      \" DATE 
 .Dt APPSWITCH 1 LOCAL    \" Program name and manual section number 
-.Os appswitch 1.0
+.Os appswitch 1.0.1
 .Sh NAME
 .Nm appswitch
-.Nd switch, hide, show, kill or list Mac OS X applications
+.Nd switch, hide, show, quit, kill or list Mac OS X applications
 .Sh SYNOPSIS
 .Nm appswitch
@@ -161,10 +161,8 @@
 The
 .Fl q
-option is very slow on Mac OS X 10.2.4 and earlier; this is an
-acknowledged bug in AECreateAppleEvent with no known workaround. Chris
-Espinosa from Apple has stated that they plan to fix it in a future
-release.
+option is very slow on Mac OS X 10.2.8 and earlier; this is an
+acknowledged bug in AECreateAppleEvent with no known workaround.
+The bug is fixed in Mac OS X 10.3.
 .Sh AUTHOR
 .An "Nicholas Riley" Aq appswitch@sabi.net
-.\" .Sh HISTORY           \" Document history if command behaves in a unique manner 
-
+.\" .Sh HISTORY           \" Document history if command behaves in a unique manner
Index: /trunk/appswitch/appswitch/appswitch.xcode/nicholas.pbxuser
===================================================================
--- /trunk/appswitch/appswitch/appswitch.xcode/nicholas.pbxuser	(revision 156)
+++ /trunk/appswitch/appswitch/appswitch.xcode/nicholas.pbxuser	(revision 156)
@@ -0,0 +1,702 @@
+// !$*UTF8*$!
+{
+	08FB7793FE84155DC02AAC07 = {
+		activeBuildStyle = 014CEA490018CE3211CA2923;
+		activeExecutable = E1A0BD2C03EFAD1C00050001;
+		activeTarget = 08FB779FFE84155DC02AAC07;
+		addToTargets = (
+			08FB779FFE84155DC02AAC07,
+		);
+		breakpoints = (
+			E18A0A3006336368008DC67C,
+			E18A0A39063363B8008DC67C,
+		);
+		codeSenseManager = E18A0A2A063362FF008DC67C;
+		executables = (
+			E1A0BD2C03EFAD1C00050001,
+		);
+		perUserDictionary = {
+			PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {
+				PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+				PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;
+				PBXFileTableDataSourceColumnWidthsKey = (
+					22,
+					525.7974,
+				);
+				PBXFileTableDataSourceColumnsKey = (
+					PBXExecutablesDataSource_ActiveFlagID,
+					PBXExecutablesDataSource_NameID,
+				);
+			};
+			PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
+				PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+				PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+				PBXFileTableDataSourceColumnWidthsKey = (
+					20,
+					321,
+					20,
+					61,
+					43,
+					43,
+					20,
+				);
+				PBXFileTableDataSourceColumnsKey = (
+					PBXFileDataSource_FiletypeID,
+					PBXFileDataSource_Filename_ColumnID,
+					PBXFileDataSource_Built_ColumnID,
+					PBXFileDataSource_ObjectSize_ColumnID,
+					PBXFileDataSource_Errors_ColumnID,
+					PBXFileDataSource_Warnings_ColumnID,
+					PBXFileDataSource_Target_ColumnID,
+				);
+			};
+			PBXPerProjectTemplateStateSaveDate = 104034524;
+			PBXPrepackagedSmartGroups_v2 = (
+				{
+					PBXTransientLocationAtTop = bottom;
+					absolutePathToBundle = "";
+					activationKey = OldTargetSmartGroup;
+					clz = PBXTargetSmartGroup;
+					description = "Displays all targets of the project.";
+					globalID = 1C37FABC04509CD000000102;
+					name = Targets;
+					preferences = {
+						image = Targets;
+					};
+				},
+				{
+					PBXTransientLocationAtTop = bottom;
+					absolutePathToBundle = "";
+					clz = PBXTargetSmartGroup2;
+					description = "Displays all targets of the project as well as nested build phases.";
+					globalID = 1C37FBAC04509CD000000102;
+					name = Targets;
+					preferences = {
+						image = Targets;
+					};
+				},
+				{
+					PBXTransientLocationAtTop = bottom;
+					absolutePathToBundle = "";
+					clz = PBXExecutablesSmartGroup;
+					description = "Displays all executables of the project.";
+					globalID = 1C37FAAC04509CD000000102;
+					name = Executables;
+					preferences = {
+						image = Executable;
+					};
+				},
+				{
+					" PBXTransientLocationAtTop " = bottom;
+					absolutePathToBundle = "";
+					clz = PBXErrorsWarningsSmartGroup;
+					description = "Displays files with errors or warnings.";
+					globalID = 1C08E77C0454961000C914BD;
+					name = "Errors and Warnings";
+					preferences = {
+						fnmatch = "";
+						image = WarningsErrors;
+						recursive = 1;
+						regex = "";
+						root = "<PROJECT>";
+					};
+				},
+				{
+					PBXTransientLocationAtTop = bottom;
+					absolutePathToBundle = "";
+					clz = PBXFilenameSmartGroup;
+					description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.";
+					globalID = 1CC0EA4004350EF90044410B;
+					name = "Implementation Files";
+					preferences = {
+						canSave = 1;
+						fnmatch = "";
+						image = SmartFolder;
+						isLeaf = 0;
+						recursive = 1;
+						regex = "?*\\.[mcMC]";
+						root = "<PROJECT>";
+					};
+				},
+				{
+					PBXTransientLocationAtTop = bottom;
+					absolutePathToBundle = "";
+					clz = PBXFilenameSmartGroup;
+					description = "This group displays Interface Builder NIB Files.";
+					globalID = 1CC0EA4004350EF90041110B;
+					name = "NIB Files";
+					preferences = {
+						canSave = 1;
+						fnmatch = "*.nib";
+						image = SmartFolder;
+						isLeaf = 0;
+						recursive = 1;
+						regex = "";
+						root = "<PROJECT>";
+					};
+				},
+				{
+					PBXTransientLocationAtTop = no;
+					absolutePathToBundle = "";
+					clz = PBXFindSmartGroup;
+					description = "Displays Find Results.";
+					globalID = 1C37FABC05509CD000000102;
+					name = "Find Results";
+					preferences = {
+						image = spyglass;
+					};
+				},
+				{
+					PBXTransientLocationAtTop = no;
+					absolutePathToBundle = "";
+					clz = PBXBookmarksSmartGroup;
+					description = "Displays Project Bookmarks.";
+					globalID = 1C37FABC05539CD112110102;
+					name = Bookmarks;
+					preferences = {
+						image = Bookmarks;
+					};
+				},
+				{
+					PBXTransientLocationAtTop = bottom;
+					absolutePathToBundle = "";
+					clz = XCSCMSmartGroup;
+					description = "Displays files with interesting SCM status.";
+					globalID = E2644B35053B69B200211256;
+					name = SCM;
+					preferences = {
+						image = PBXRepository;
+						isLeaf = 0;
+					};
+				},
+				{
+					PBXTransientLocationAtTop = bottom;
+					absolutePathToBundle = "";
+					clz = PBXSymbolsSmartGroup;
+					description = "Displays all symbols for the project.";
+					globalID = 1C37FABC04509CD000100104;
+					name = "Project Symbols";
+					preferences = {
+						image = ProjectSymbols;
+						isLeaf = 1;
+					};
+				},
+				{
+					PBXTransientLocationAtTop = bottom;
+					absolutePathToBundle = "";
+					clz = PBXFilenameSmartGroup;
+					description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.";
+					globalID = PBXTemplateMarker;
+					name = "Simple Filter SmartGroup";
+					preferences = {
+						canSave = 1;
+						fnmatch = "*.nib";
+						image = SmartFolder;
+						isLeaf = 0;
+						recursive = 1;
+						regex = "";
+						root = "<PROJECT>";
+					};
+				},
+				{
+					PBXTransientLocationAtTop = bottom;
+					absolutePathToBundle = "";
+					clz = PBXFilenameSmartGroup;
+					description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.";
+					globalID = PBXTemplateMarker;
+					name = "Simple Regular Expression SmartGroup";
+					preferences = {
+						canSave = 1;
+						fnmatch = "";
+						image = SmartFolder;
+						isLeaf = 0;
+						recursive = 1;
+						regex = "?*\\.[mcMC]";
+						root = "<PROJECT>";
+					};
+				},
+			);
+			PBXWorkspaceContents = (
+				{
+					PBXProjectWorkspaceModule_StateKey_Rev39 = {
+						PBXProjectWorkspaceModule_DEGV_Geometry = {
+							_collapsingFrameDimension = 0;
+							_indexOfCollapsedView = 0;
+							_percentageOfCollapsedView = 0;
+							isCollapsed = yes;
+							sizes = (
+								"{{0, 0}, {571, 118}}",
+								"{{0, 118}, {571, 547}}",
+							);
+						};
+						PBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {
+							BoundsStr = "{{0, 0}, {556, 101}}";
+							Rows = (
+								0,
+							);
+							VisibleRectStr = "{{0, 0}, {556, 101}}";
+						};
+						PBXProjectWorkspaceModule_EditorOpen = true;
+						PBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {
+							PBXSplitModuleInNavigatorKey = {
+								Split0 = {
+									bookmark = E1737411063370F0002A81F1;
+									history = (
+										E18A0A500633657C008DC67C,
+										E18A0A5B0633660A008DC67C,
+										E18A0A6B06336B3F008DC67C,
+										E18A0A6F06336B56008DC67C,
+										E173740F063370F0002A81F1,
+										E18A0A3A06336491008DC67C,
+									);
+									prevStack = (
+										E18A0A3C06336491008DC67C,
+										E18A0A6306336B3C008DC67C,
+										E18A0A6806336B3E008DC67C,
+										E18A0A6C06336B3F008DC67C,
+										E1737410063370F0002A81F1,
+									);
+								};
+								SplitCount = 1;
+							};
+						};
+						PBXProjectWorkspaceModule_GeometryKey_Rev15 = {
+							PBXProjectWorkspaceModule_SGTM_Geometry = {
+								_collapsingFrameDimension = 0;
+								_indexOfCollapsedView = 0;
+								_percentageOfCollapsedView = 0;
+								sizes = (
+									"{{0, 0}, {182, 665}}",
+									"{{182, 0}, {571, 665}}",
+								);
+							};
+						};
+						PBXProjectWorkspaceModule_OldDetailFrame = "{{0, 0}, {571, 118}}";
+						PBXProjectWorkspaceModule_OldEditorFrame = "{{0, 118}, {571, 547}}";
+						PBXProjectWorkspaceModule_OldSuperviewFrame = "{{182, 0}, {571, 665}}";
+						PBXProjectWorkspaceModule_SGTM = {
+							PBXBottomSmartGroupGIDs = (
+								1C37FBAC04509CD000000102,
+								1C37FAAC04509CD000000102,
+								1C08E77C0454961000C914BD,
+								1CC0EA4004350EF90044410B,
+								1CC0EA4004350EF90041110B,
+								1C37FABC05509CD000000102,
+								1C37FABC05539CD112110102,
+								E2644B35053B69B200211256,
+								1C37FABC04509CD000100104,
+							);
+							PBXSmartGroupTreeModuleColumnData = {
+								PBXSmartGroupTreeModuleColumnWidthsKey = (
+									165,
+								);
+								PBXSmartGroupTreeModuleColumnsKey_v4 = (
+									MainColumn,
+								);
+							};
+							PBXSmartGroupTreeModuleOutlineStateKey_v7 = {
+								PBXSmartGroupTreeModuleOutlineStateExpansionKey = (
+									08FB7794FE84155DC02AAC07,
+									08FB7795FE84155DC02AAC07,
+									C6859E96029091FE04C91782,
+									1C37FAAC04509CD000000102,
+								);
+								PBXSmartGroupTreeModuleOutlineStateSelectionKey = (
+									(
+										10,
+									),
+								);
+								PBXSmartGroupTreeModuleOutlineStateVisibleRectKey = "{{0, 0}, {165, 647}}";
+							};
+							PBXTopSmartGroupGIDs = (
+							);
+						};
+					};
+				},
+			);
+			"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXBuildResultsModule" = {
+			};
+			"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugCLIModule" = {
+			};
+			"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugSessionModule" = {
+				Debugger = {
+					HorizontalSplitView = {
+						_collapsingFrameDimension = 0;
+						_indexOfCollapsedView = 0;
+						_percentageOfCollapsedView = 0;
+						isCollapsed = yes;
+						sizes = (
+							"{{0, 0}, {180, 195}}",
+							"{{180, 0}, {565, 195}}",
+						);
+					};
+					VerticalSplitView = {
+						_collapsingFrameDimension = 0;
+						_indexOfCollapsedView = 0;
+						_percentageOfCollapsedView = 0;
+						isCollapsed = yes;
+						sizes = (
+							"{{0, 0}, {745, 195}}",
+							"{{0, 195}, {745, 227}}",
+						);
+					};
+				};
+				LauncherConfigVersion = 8;
+			};
+			"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXNavigatorGroup" = {
+				PBXSplitModuleInNavigatorKey = {
+					SplitCount = 1;
+				};
+			};
+			"PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule" = {
+				PBXProjectWorkspaceModule_StateKey_Rev39 = {
+					PBXProjectWorkspaceModule_DEGV_Geometry = {
+						_collapsingFrameDimension = 0;
+						_indexOfCollapsedView = 0;
+						_percentageOfCollapsedView = 0;
+						isCollapsed = yes;
+						sizes = (
+							"{{0, 0}, {571, 115}}",
+							"{{0, 115}, {571, 550}}",
+						);
+					};
+					PBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {
+						BoundsStr = "{{0, 0}, {556, 98}}";
+						Rows = (
+							0,
+						);
+						VisibleRectStr = "{{0, 0}, {556, 98}}";
+					};
+					PBXProjectWorkspaceModule_EditorOpen = true;
+					PBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {
+						PBXSplitModuleInNavigatorKey = {
+							Split0 = {
+								bookmark = E18A0A28063362F9008DC67C;
+								history = (
+									E18A0A22063362F5008DC67C,
+								);
+							};
+							SplitCount = 1;
+						};
+					};
+					PBXProjectWorkspaceModule_GeometryKey_Rev15 = {
+						PBXProjectWorkspaceModule_SGTM_Geometry = {
+							_collapsingFrameDimension = 0;
+							_indexOfCollapsedView = 0;
+							_percentageOfCollapsedView = 0;
+							sizes = (
+								"{{0, 0}, {182, 665}}",
+								"{{182, 0}, {571, 665}}",
+							);
+						};
+					};
+					PBXProjectWorkspaceModule_OldDetailFrame = "{{0, 0}, {571, 115}}";
+					PBXProjectWorkspaceModule_OldEditorFrame = "{{0, 115}, {571, 550}}";
+					PBXProjectWorkspaceModule_OldSuperviewFrame = "{{182, 0}, {571, 665}}";
+					PBXProjectWorkspaceModule_SGTM = {
+						PBXBottomSmartGroupGIDs = (
+							1C37FBAC04509CD000000102,
+							1C37FAAC04509CD000000102,
+							1C08E77C0454961000C914BD,
+							1CC0EA4004350EF90044410B,
+							1CC0EA4004350EF90041110B,
+							1C37FABC05509CD000000102,
+							1C37FABC05539CD112110102,
+							E2644B35053B69B200211256,
+							1C37FABC04509CD000100104,
+						);
+						PBXSmartGroupTreeModuleColumnData = {
+							PBXSmartGroupTreeModuleColumnWidthsKey = (
+								165,
+							);
+							PBXSmartGroupTreeModuleColumnsKey_v4 = (
+								MainColumn,
+							);
+						};
+						PBXSmartGroupTreeModuleOutlineStateKey_v7 = {
+							PBXSmartGroupTreeModuleOutlineStateExpansionKey = (
+								08FB7794FE84155DC02AAC07,
+								08FB7795FE84155DC02AAC07,
+							);
+							PBXSmartGroupTreeModuleOutlineStateSelectionKey = (
+								(
+									2,
+									1,
+									0,
+								),
+							);
+							PBXSmartGroupTreeModuleOutlineStateVisibleRectKey = "{{0, 0}, {165, 647}}";
+						};
+						PBXTopSmartGroupGIDs = (
+						);
+					};
+				};
+			};
+			PBXWorkspaceGeometries = (
+				{
+					Frame = "{{0, 0}, {753, 665}}";
+					PBXProjectWorkspaceModule_GeometryKey_Rev15 = {
+					};
+					RubberWindowFrame = "46 125 753 707 0 0 1280 832 ";
+				},
+			);
+			"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXBuildResultsModule" = {
+				Frame = "{{0, 0}, {480, 217}}";
+				PBXModuleWindowStatusBarHidden = YES;
+				RubberWindowFrame = "400 466 480 238 0 0 1280 832 ";
+			};
+			"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugCLIModule" = {
+				Frame = "{{0, 0}, {400, 201}}";
+				PBXModuleWindowStatusBarHidden = YES;
+				RubberWindowFrame = "50 804 400 222 0 0 1280 832 ";
+			};
+			"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugSessionModule" = {
+				DebugConsoleDrawerSize = "{100, 120}";
+				DebugConsoleVisible = Drawer;
+				DebugConsoleWindowFrame = "{{200, 200}, {500, 300}}";
+				DebugSTDIOWindowFrame = "{{200, 200}, {500, 300}}";
+				Frame = "{{0, 0}, {745, 422}}";
+				RubberWindowFrame = "398 164 745 464 0 0 1280 832 ";
+			};
+			"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXNavigatorGroup" = {
+				Frame = "{{0, 0}, {750, 481}}";
+				PBXModuleWindowStatusBarHidden = YES;
+				RubberWindowFrame = "15 325 750 502 0 0 1280 832 ";
+			};
+			"PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule" = {
+				Frame = "{{0, 0}, {753, 665}}";
+				PBXProjectWorkspaceModule_GeometryKey_Rev15 = {
+				};
+				RubberWindowFrame = "46 125 753 707 0 0 1280 832 ";
+			};
+			PBXWorkspaceStateSaveDate = 104034524;
+		};
+		perUserProjectItems = {
+			E173740F063370F0002A81F1 = E173740F063370F0002A81F1;
+			E1737410063370F0002A81F1 = E1737410063370F0002A81F1;
+			E1737411063370F0002A81F1 = E1737411063370F0002A81F1;
+			E18A0A3A06336491008DC67C = E18A0A3A06336491008DC67C;
+			E18A0A3C06336491008DC67C = E18A0A3C06336491008DC67C;
+			E18A0A500633657C008DC67C = E18A0A500633657C008DC67C;
+			E18A0A5B0633660A008DC67C = E18A0A5B0633660A008DC67C;
+			E18A0A6306336B3C008DC67C = E18A0A6306336B3C008DC67C;
+			E18A0A6806336B3E008DC67C = E18A0A6806336B3E008DC67C;
+			E18A0A6B06336B3F008DC67C = E18A0A6B06336B3F008DC67C;
+			E18A0A6C06336B3F008DC67C = E18A0A6C06336B3F008DC67C;
+			E18A0A6F06336B56008DC67C = E18A0A6F06336B56008DC67C;
+		};
+		sourceControlManager = E18A0A29063362FF008DC67C;
+		userBuildSettings = {
+		};
+	};
+	08FB7796FE84155DC02AAC07 = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {709, 5843}}";
+			sepNavSelRange = "{14100, 30}";
+			sepNavVisRect = "{{0, 4189}, {709, 443}}";
+			sepNavWindowFrame = "{{15, 325}, {750, 502}}";
+		};
+	};
+	08FB779FFE84155DC02AAC07 = {
+		activeExec = 0;
+		executables = (
+			E1A0BD2C03EFAD1C00050001,
+		);
+	};
+	C6859E970290921104C91782 = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {530, 2027}}";
+			sepNavSelRange = "{122, 0}";
+			sepNavVisRect = "{{0, 1494}, {530, 533}}";
+		};
+	};
+	E16C83CC03F7AF7B00050002 = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {530, 1036}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRect = "{{0, 0}, {530, 533}}";
+		};
+	};
+	E16C842F03FB74A500050002 = {
+		isa = PBXFileReference;
+		lastKnownFileType = sourcecode.c.h;
+		name = CFString.h;
+		path = /System/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFString.h;
+		refType = 0;
+		sourceTree = "<absolute>";
+	};
+	E173740F063370F0002A81F1 = {
+		fRef = C6859E970290921104C91782;
+		isa = PBXTextBookmark;
+		name = "appswitch.1: 4";
+		rLen = 0;
+		rLoc = 122;
+		rType = 0;
+		vrLen = 1440;
+		vrLoc = 4186;
+	};
+	E1737410063370F0002A81F1 = {
+		fRef = C6859E970290921104C91782;
+		isa = PBXTextBookmark;
+		name = "appswitch.1: 4";
+		rLen = 0;
+		rLoc = 122;
+		rType = 0;
+		vrLen = 1440;
+		vrLoc = 4186;
+	};
+	E1737411063370F0002A81F1 = {
+		exec = E1A0BD2C03EFAD1C00050001;
+		isa = PBXExecutableBookmark;
+		uiCtxt = {
+			buildSettingsExpandedSubviews = (
+				0,
+				1,
+				2,
+				3,
+				4,
+				5,
+			);
+			buildSettingsVisRect = "{{0, 0}, {556, 498}}";
+		};
+	};
+	E18A0A29063362FF008DC67C = {
+		isa = PBXSourceControlManager;
+		scmConfiguration = {
+		};
+		scmType = scm.cvs;
+	};
+	E18A0A2A063362FF008DC67C = {
+		indexTemplatePath = "";
+		isa = PBXCodeSenseManager;
+		usesDefaults = 1;
+		wantsCodeCompletion = 1;
+		wantsCodeCompletionAutoPopup = 1;
+		wantsCodeCompletionAutoSuggestions = 1;
+		wantsCodeCompletionCaseSensitivity = 1;
+		wantsCodeCompletionOnlyMatchingItems = 1;
+		wantsCodeCompletionParametersIncluded = 1;
+		wantsCodeCompletionPlaceholdersInserted = 1;
+		wantsCodeCompletionTabCompletes = 1;
+		wantsIndex = 1;
+	};
+	E18A0A3006336368008DC67C = {
+		fileReference = 08FB7796FE84155DC02AAC07;
+		functionName = "matchApplication()";
+		isa = PBXFileBreakpoint;
+		lineNumber = 355;
+		state = 1;
+	};
+	E18A0A39063363B8008DC67C = {
+		fileReference = 08FB7796FE84155DC02AAC07;
+		functionName = "matchApplication()";
+		isa = PBXFileBreakpoint;
+		lineNumber = 353;
+		state = 1;
+	};
+	E18A0A3A06336491008DC67C = {
+		exec = E1A0BD2C03EFAD1C00050001;
+		isa = PBXExecutableBookmark;
+	};
+	E18A0A3C06336491008DC67C = {
+		exec = E1A0BD2C03EFAD1C00050001;
+		isa = PBXExecutableBookmark;
+	};
+	E18A0A500633657C008DC67C = {
+		fRef = E16C83CC03F7AF7B00050002;
+		isa = PBXTextBookmark;
+		name = "README: 76";
+		rLen = 0;
+		rLoc = 2574;
+		rType = 0;
+		vrLen = 1666;
+		vrLoc = 1642;
+	};
+	E18A0A5B0633660A008DC67C = {
+		fRef = E16C842F03FB74A500050002;
+		isa = PBXTextBookmark;
+		name = CFComparisonResult;
+		rLen = 18;
+		rLoc = 17127;
+		rType = 0;
+		vrLen = 2160;
+		vrLoc = 16209;
+	};
+	E18A0A6306336B3C008DC67C = {
+		fRef = 08FB7796FE84155DC02AAC07;
+		isa = PBXTextBookmark;
+		name = "main.c: 249";
+		rLen = 0;
+		rLoc = 10218;
+		rType = 0;
+		vrLen = 1331;
+		vrLoc = 9714;
+	};
+	E18A0A6806336B3E008DC67C = {
+		fRef = C6859E970290921104C91782;
+		isa = PBXTextBookmark;
+		name = "appswitch.1: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1708;
+		vrLoc = 0;
+	};
+	E18A0A6B06336B3F008DC67C = {
+		fRef = E1A0BD3203EFAD9E00050001;
+		isa = PBXTextBookmark;
+		name = "CPS.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 570;
+		vrLoc = 0;
+	};
+	E18A0A6C06336B3F008DC67C = {
+		fRef = E1A0BD3203EFAD9E00050001;
+		isa = PBXTextBookmark;
+		name = "CPS.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 570;
+		vrLoc = 0;
+	};
+	E18A0A6F06336B56008DC67C = {
+		fRef = 08FB7796FE84155DC02AAC07;
+		isa = PBXTextBookmark;
+		name = "main.c: 463";
+		rLen = 0;
+		rLoc = 18890;
+		rType = 0;
+		vrLen = 1696;
+		vrLoc = 17194;
+	};
+	E1A0BD2C03EFAD1C00050001 = {
+		activeArgIndex = 2147483647;
+		activeArgIndices = (
+		);
+		argumentStrings = (
+		);
+		configStateDict = {
+		};
+		debuggerPlugin = GDBDebugging;
+		dylibVariantSuffix = "";
+		enableDebugStr = 1;
+		environmentEntries = (
+		);
+		isa = PBXExecutable;
+		name = appswitch;
+		shlibInfoDictList = (
+		);
+		sourceDirectories = (
+		);
+	};
+	E1A0BD3203EFAD9E00050001 = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {530, 3532}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRect = "{{0, 0}, {530, 533}}";
+		};
+	};
+}
Index: /trunk/appswitch/appswitch/appswitch.xcode/project.pbxproj
===================================================================
--- /trunk/appswitch/appswitch/appswitch.xcode/project.pbxproj	(revision 156)
+++ /trunk/appswitch/appswitch/appswitch.xcode/project.pbxproj	(revision 156)
@@ -0,0 +1,305 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 39;
+	objects = {
+		014CEA490018CE3211CA2923 = {
+			buildRules = (
+			);
+			buildSettings = {
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				OPTIMIZATION_CFLAGS = "-O0";
+				ZERO_LINK = YES;
+			};
+			isa = PBXBuildStyle;
+			name = Development;
+		};
+		014CEA4A0018CE3211CA2923 = {
+			buildRules = (
+			);
+			buildSettings = {
+				COPY_PHASE_STRIP = YES;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				ZERO_LINK = NO;
+			};
+			isa = PBXBuildStyle;
+			name = Deployment;
+		};
+//010
+//011
+//012
+//013
+//014
+//030
+//031
+//032
+//033
+//034
+		034768E2FF38A6DC11DB9C8B = {
+			explicitFileType = "compiled.mach-o.executable";
+			fallbackIsa = PBXFileReference;
+			isa = PBXExecutableFileReference;
+			path = appswitch;
+			refType = 3;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+//030
+//031
+//032
+//033
+//034
+//080
+//081
+//082
+//083
+//084
+		08FB7793FE84155DC02AAC07 = {
+			buildSettings = {
+			};
+			buildStyles = (
+				014CEA490018CE3211CA2923,
+				014CEA4A0018CE3211CA2923,
+			);
+			hasScannedForEncodings = 1;
+			isa = PBXProject;
+			mainGroup = 08FB7794FE84155DC02AAC07;
+			projectDirPath = "";
+			targets = (
+				08FB779FFE84155DC02AAC07,
+			);
+		};
+		08FB7794FE84155DC02AAC07 = {
+			children = (
+				08FB7795FE84155DC02AAC07,
+				C6859E96029091FE04C91782,
+				08FB779DFE84155DC02AAC07,
+				19C28FBDFE9D53C911CA2CBB,
+			);
+			isa = PBXGroup;
+			name = appswitch;
+			refType = 4;
+			sourceTree = "<group>";
+		};
+		08FB7795FE84155DC02AAC07 = {
+			children = (
+				08FB7796FE84155DC02AAC07,
+				E1A0BD3203EFAD9E00050001,
+			);
+			isa = PBXGroup;
+			name = Source;
+			refType = 4;
+			sourceTree = "<group>";
+		};
+		08FB7796FE84155DC02AAC07 = {
+			fileEncoding = 4;
+			indentWidth = 4;
+			isa = PBXFileReference;
+			lastKnownFileType = sourcecode.c.c;
+			path = main.c;
+			refType = 4;
+			sourceTree = "<group>";
+			tabWidth = 8;
+			usesTabs = 0;
+		};
+		08FB779DFE84155DC02AAC07 = {
+			children = (
+				E1A0BD4C03EFB64400050001,
+			);
+			isa = PBXGroup;
+			name = "External Frameworks and Libraries";
+			refType = 4;
+			sourceTree = "<group>";
+		};
+		08FB779FFE84155DC02AAC07 = {
+			buildPhases = (
+				08FB77A0FE84155DC02AAC07,
+				08FB77A1FE84155DC02AAC07,
+				08FB77A3FE84155DC02AAC07,
+				08FB77A5FE84155DC02AAC07,
+				C6859E980290922304C91782,
+			);
+			buildSettings = {
+				FRAMEWORK_SEARCH_PATHS = "";
+				HEADER_SEARCH_PATHS = "";
+				INSTALL_PATH = "$(HOME)/bin";
+				LIBRARY_SEARCH_PATHS = "";
+				OTHER_CFLAGS = "";
+				OTHER_LDFLAGS = "";
+				OTHER_REZFLAGS = "";
+				PRODUCT_NAME = appswitch;
+				REZ_EXECUTABLE = YES;
+				SECTORDER_FLAGS = "";
+				WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
+			};
+			dependencies = (
+			);
+			isa = PBXToolTarget;
+			name = appswitch;
+			productInstallPath = "$(HOME)/bin";
+			productName = appswitch;
+			productReference = 034768E2FF38A6DC11DB9C8B;
+		};
+		08FB77A0FE84155DC02AAC07 = {
+			buildActionMask = 2147483647;
+			files = (
+				E1A0BD3303EFAD9E00050001,
+			);
+			isa = PBXHeadersBuildPhase;
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		08FB77A1FE84155DC02AAC07 = {
+			buildActionMask = 2147483647;
+			files = (
+				08FB77A2FE84155DC02AAC07,
+			);
+			isa = PBXSourcesBuildPhase;
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		08FB77A2FE84155DC02AAC07 = {
+			fileRef = 08FB7796FE84155DC02AAC07;
+			isa = PBXBuildFile;
+			settings = {
+				ATTRIBUTES = (
+				);
+			};
+		};
+		08FB77A3FE84155DC02AAC07 = {
+			buildActionMask = 2147483647;
+			files = (
+				E1A0BD4D03EFB64400050001,
+			);
+			isa = PBXFrameworksBuildPhase;
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		08FB77A5FE84155DC02AAC07 = {
+			buildActionMask = 2147483647;
+			files = (
+			);
+			isa = PBXRezBuildPhase;
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+//080
+//081
+//082
+//083
+//084
+//190
+//191
+//192
+//193
+//194
+		19C28FBDFE9D53C911CA2CBB = {
+			children = (
+				034768E2FF38A6DC11DB9C8B,
+			);
+			isa = PBXGroup;
+			name = Products;
+			refType = 4;
+			sourceTree = "<group>";
+		};
+//190
+//191
+//192
+//193
+//194
+//C60
+//C61
+//C62
+//C63
+//C64
+		C6859E96029091FE04C91782 = {
+			children = (
+				C6859E970290921104C91782,
+				E16C83CC03F7AF7B00050002,
+			);
+			isa = PBXGroup;
+			name = Documentation;
+			refType = 4;
+			sourceTree = "<group>";
+		};
+		C6859E970290921104C91782 = {
+			isa = PBXFileReference;
+			lastKnownFileType = text.man;
+			path = appswitch.1;
+			refType = 4;
+			sourceTree = "<group>";
+		};
+		C6859E980290922304C91782 = {
+			buildActionMask = 8;
+			dstPath = /usr/share/man/man1/;
+			dstSubfolderSpec = 0;
+			files = (
+				C6859E990290922B04C91782,
+				E16C83CD03F7AF7B00050002,
+			);
+			isa = PBXCopyFilesBuildPhase;
+			runOnlyForDeploymentPostprocessing = 1;
+		};
+		C6859E990290922B04C91782 = {
+			fileRef = C6859E970290921104C91782;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+//C60
+//C61
+//C62
+//C63
+//C64
+//E10
+//E11
+//E12
+//E13
+//E14
+		E16C83CC03F7AF7B00050002 = {
+			fileEncoding = 4;
+			isa = PBXFileReference;
+			lastKnownFileType = text;
+			path = README;
+			refType = 4;
+			sourceTree = "<group>";
+		};
+		E16C83CD03F7AF7B00050002 = {
+			fileRef = E16C83CC03F7AF7B00050002;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		E1A0BD3203EFAD9E00050001 = {
+			fileEncoding = 30;
+			isa = PBXFileReference;
+			lastKnownFileType = sourcecode.c.h;
+			path = CPS.h;
+			refType = 4;
+			sourceTree = "<group>";
+		};
+		E1A0BD3303EFAD9E00050001 = {
+			fileRef = E1A0BD3203EFAD9E00050001;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		E1A0BD4C03EFB64400050001 = {
+			fallbackIsa = PBXFileReference;
+			isa = PBXFrameworkReference;
+			lastKnownFileType = wrapper.framework;
+			name = ApplicationServices.framework;
+			path = /System/Library/Frameworks/ApplicationServices.framework;
+			refType = 0;
+			sourceTree = "<absolute>";
+		};
+		E1A0BD4D03EFB64400050001 = {
+			fileRef = E1A0BD4C03EFB64400050001;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+	};
+	rootObject = 08FB7793FE84155DC02AAC07;
+}
Index: /trunk/appswitch/appswitch/main.c
===================================================================
--- /trunk/appswitch/appswitch/main.c	(revision 155)
+++ /trunk/appswitch/appswitch/main.c	(revision 156)
@@ -3,5 +3,5 @@
  Nicholas Riley <appswitch@sabi.net>
 
- Copyright (c) 2003, Nicholas Riley
+ Copyright (c) 2003-04, Nicholas Riley
  All rights reserved.
 
@@ -250,7 +250,13 @@
     if (bundle != NULL) {
         *bundleID = CFBundleGetIdentifier(bundle);
+        if (*bundleID != NULL) {
+            CFRetain(*bundleID);
 #if DEBUG
-        CFShow(*bundleID);
+            CFShow(*bundleID);
 #endif
+        }
+        CFRelease(bundle);
+    } else {
+        *bundleID = NULL;
     }
     CFRelease(url);
@@ -346,6 +352,10 @@
                    if (!bundleIdentifierForApplication(&bundleID, path))
                        errexit("can't get bundle location for process '%s' (PSN %ld.%ld, pid %ld)", name, psn.hi, psn.lo, info->UnixPID);
-                   if (bundleID != NULL && CFStringCompare(OPTS.bundleID, bundleID, kCFCompareCaseInsensitive) == kCFCompareEqualTo)
-                       break;
+                   if (bundleID != NULL) {
+                       CFComparisonResult result = CFStringCompare(OPTS.bundleID, bundleID, kCFCompareCaseInsensitive);
+                       if (result == kCFCompareEqualTo)
+                           break;
+		       CFRelease(bundleID);
+                   }
                    continue;
                }
