From 0ea3270420b2915064b1b62e840ae7d87c024ce0 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Thu, 8 Jul 2010 22:26:58 +0000 Subject: [PATCH] git-svn-id: svn://qnap.local/TwoTerm/trunk@1649 5590a31f-7b70-45f8-8c82-aa3a8e5f4507 --- 2Term.xcodeproj/kelvin.pbxuser | 864 ++++++ 2Term.xcodeproj/kelvin.perspectivev3 | 1511 ++++++++++ 2Term.xcodeproj/project.pbxproj | 347 +++ CharacterGenerator.h | 22 + CharacterGenerator.m | 1343 +++++++++ Emulator.h | 26 + EmulatorView.h | 79 + EmulatorView.mm | 175 ++ English.lproj/InfoPlist.strings | 2 + English.lproj/MainMenu.xib | 4182 ++++++++++++++++++++++++++ English.lproj/TermWindow.xib | 658 ++++ OutputChannel.cpp | 75 + OutputChannel.h | 36 + Screen.cpp | 229 ++ Screen.h | 133 + TermWindowController.h | 24 + TermWindowController.m | 98 + TwoTerm-Info.plist | 32 + TwoTermAppDelegate.h | 18 + TwoTermAppDelegate.m | 38 + VT05.h | 27 + VT05.mm | 231 ++ VT52.h | 27 + VT52.mm | 454 +++ VT52View.h | 36 + VT52View.mm | 676 +++++ iGeometry.h | 54 + main.m | 14 + 28 files changed, 11411 insertions(+) create mode 100644 2Term.xcodeproj/kelvin.pbxuser create mode 100644 2Term.xcodeproj/kelvin.perspectivev3 create mode 100644 2Term.xcodeproj/project.pbxproj create mode 100644 CharacterGenerator.h create mode 100644 CharacterGenerator.m create mode 100644 Emulator.h create mode 100644 EmulatorView.h create mode 100644 EmulatorView.mm create mode 100644 English.lproj/InfoPlist.strings create mode 100644 English.lproj/MainMenu.xib create mode 100644 English.lproj/TermWindow.xib create mode 100644 OutputChannel.cpp create mode 100644 OutputChannel.h create mode 100644 Screen.cpp create mode 100644 Screen.h create mode 100644 TermWindowController.h create mode 100644 TermWindowController.m create mode 100644 TwoTerm-Info.plist create mode 100644 TwoTermAppDelegate.h create mode 100644 TwoTermAppDelegate.m create mode 100644 VT05.h create mode 100644 VT05.mm create mode 100644 VT52.h create mode 100644 VT52.mm create mode 100644 VT52View.h create mode 100644 VT52View.mm create mode 100644 iGeometry.h create mode 100644 main.m diff --git a/2Term.xcodeproj/kelvin.pbxuser b/2Term.xcodeproj/kelvin.pbxuser new file mode 100644 index 0000000..7b9b55a --- /dev/null +++ b/2Term.xcodeproj/kelvin.pbxuser @@ -0,0 +1,864 @@ +// !$*UTF8*$! +{ + 256AC3D80F4B6AC300CF3369 /* TwoTermAppDelegate.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {769, 248}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 397}"; + }; + }; + 256AC3D90F4B6AC300CF3369 /* TwoTermAppDelegate.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {653, 507}}"; + sepNavSelRange = "{778, 0}"; + sepNavVisRange = "{0, 778}"; + }; + }; + 256AC3F00F4B6AF500CF3369 /* TwoTerm_Prefix.pch */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {769, 271}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 141}"; + }; + }; + 29B97313FDCFA39411CA2CEA /* Project object */ = { + activeBuildConfigurationName = Debug; + activeExecutable = B676053511DADB8100D6B66C /* 2Term */; + activeTarget = 8D1107260486CEB800E47090 /* 2Term */; + addToTargets = ( + 8D1107260486CEB800E47090 /* 2Term */, + ); + breakpoints = ( + B676066111DEBFB000D6B66C /* TwoTermAppDelegate.m:35 */, + B676066711DEC06900D6B66C /* TermWindowController.m:31 */, + B676069511DEC97D00D6B66C /* TermWindowController.m:97 */, + B67606B011DECD4E00D6B66C /* TermWindowController.m:97 */, + B676070811DF8F4100D6B66C /* TermWindowController.m:97 */, + B65FA27911E29E8D00EB447E /* EmulatorView.mm:64 */, + B649E13D11E2BC7A0061921F /* VT52View.mm:460 */, + B649E15211E2BF130061921F /* VT52View.mm:107 */, + B649E17111E2C3C50061921F /* VT52View.mm:598 */, + B649E17311E2C3C80061921F /* VT52View.mm:607 */, + B649E18B11E2CC4A0061921F /* VT52View.mm:170 */, + B649E19511E2CC800061921F /* VT52View.mm:113 */, + ); + codeSenseManager = B676054911DADB9100D6B66C /* Code sense */; + executables = ( + B676053511DADB8100D6B66C /* 2Term */, + ); + perUserDictionary = { + "PBXConfiguration.PBXBreakpointsDataSource.v1:1CA23EDF0692099D00951B8B" = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_BreakpointID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 20, + 239, + 20, + 139, + 139, + 68, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXBreakpointsDataSource_ActionID, + PBXBreakpointsDataSource_TypeID, + PBXBreakpointsDataSource_BreakpointID, + PBXBreakpointsDataSource_UseID, + PBXBreakpointsDataSource_LocationID, + PBXBreakpointsDataSource_ConditionID, + PBXBreakpointsDataSource_IgnoreCountID, + PBXBreakpointsDataSource_ContinueID, + ); + }; + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 475, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 551, + 60, + 20, + 48.16259765625, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 300230821; + PBXWorkspaceStateSaveDate = 300230821; + }; + perUserProjectItems = { + B649E0B511E2A88D0061921F /* PBXTextBookmark */ = B649E0B511E2A88D0061921F /* PBXTextBookmark */; + B649E1B211E2CDDE0061921F /* PBXTextBookmark */ = B649E1B211E2CDDE0061921F /* PBXTextBookmark */; + B65FA28111E29EDE00EB447E /* PBXTextBookmark */ = B65FA28111E29EDE00EB447E /* PBXTextBookmark */; + B65FA2AD11E29F9300EB447E /* PBXTextBookmark */ = B65FA2AD11E29F9300EB447E /* PBXTextBookmark */; + B65FA2B411E29F9A00EB447E /* PBXTextBookmark */ = B65FA2B411E29F9A00EB447E /* PBXTextBookmark */; + B65FA2FE11E2A5D200EB447E /* PBXTextBookmark */ = B65FA2FE11E2A5D200EB447E /* PBXTextBookmark */; + B676058811DAE21100D6B66C /* PBXTextBookmark */ = B676058811DAE21100D6B66C /* PBXTextBookmark */; + B676058911DAE21100D6B66C /* PBXTextBookmark */ = B676058911DAE21100D6B66C /* PBXTextBookmark */; + B676058B11DAE21100D6B66C /* PlistBookmark */ = B676058B11DAE21100D6B66C /* PlistBookmark */; + B676058C11DAE21100D6B66C /* PBXTextBookmark */ = B676058C11DAE21100D6B66C /* PBXTextBookmark */; + B676060711DD4FA600D6B66C /* PBXTextBookmark */ = B676060711DD4FA600D6B66C /* PBXTextBookmark */; + B676062F11DE96AE00D6B66C /* PBXTextBookmark */ = B676062F11DE96AE00D6B66C /* PBXTextBookmark */; + B676064811DEB80600D6B66C /* PBXTextBookmark */ = B676064811DEB80600D6B66C /* PBXTextBookmark */; + B67606C811DED91C00D6B66C /* PBXTextBookmark */ = B67606C811DED91C00D6B66C /* PBXTextBookmark */; + B699A0BE11E58D3B00F54CC8 /* PBXTextBookmark */ = B699A0BE11E58D3B00F54CC8 /* PBXTextBookmark */; + B699A0BF11E58D3B00F54CC8 /* PBXTextBookmark */ = B699A0BF11E58D3B00F54CC8 /* PBXTextBookmark */; + B699A0C011E58D3B00F54CC8 /* PBXTextBookmark */ = B699A0C011E58D3B00F54CC8 /* PBXTextBookmark */; + B699A0C111E58D3B00F54CC8 /* PBXTextBookmark */ = B699A0C111E58D3B00F54CC8 /* PBXTextBookmark */; + B699A0C211E58D3B00F54CC8 /* PBXTextBookmark */ = B699A0C211E58D3B00F54CC8 /* PBXTextBookmark */; + B699A0C311E58D3B00F54CC8 /* PBXTextBookmark */ = B699A0C311E58D3B00F54CC8 /* PBXTextBookmark */; + B699A0C411E58D3B00F54CC8 /* PBXTextBookmark */ = B699A0C411E58D3B00F54CC8 /* PBXTextBookmark */; + B699A0C511E58D3B00F54CC8 /* PBXTextBookmark */ = B699A0C511E58D3B00F54CC8 /* PBXTextBookmark */; + B699A0C611E58D3B00F54CC8 /* PBXTextBookmark */ = B699A0C611E58D3B00F54CC8 /* PBXTextBookmark */; + B699A0C711E58D3B00F54CC8 /* PBXTextBookmark */ = B699A0C711E58D3B00F54CC8 /* PBXTextBookmark */; + B699A0C811E58D3B00F54CC8 /* PBXTextBookmark */ = B699A0C811E58D3B00F54CC8 /* PBXTextBookmark */; + B6EBE2CA11E0FF3E00EA0458 /* PBXTextBookmark */ = B6EBE2CA11E0FF3E00EA0458 /* PBXTextBookmark */; + B6F444CD11E41C7200C3A836 /* PBXTextBookmark */ = B6F444CD11E41C7200C3A836 /* PBXTextBookmark */; + B6F444CF11E41C7200C3A836 /* PBXTextBookmark */ = B6F444CF11E41C7200C3A836 /* PBXTextBookmark */; + }; + sourceControlManager = B676054811DADB9100D6B66C /* Source Control */; + userBuildSettings = { + }; + }; + 29B97316FDCFA39411CA2CEA /* main.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {769, 271}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 256}"; + }; + }; + 8D1107260486CEB800E47090 /* 2Term */ = { + activeExec = 0; + executables = ( + B676053511DADB8100D6B66C /* 2Term */, + ); + }; + B649E0B511E2A88D0061921F /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B6EBE2B411E0EA9100EA0458 /* CharacterGenerator.m */; + name = "CharacterGenerator.m: 1276"; + rLen = 0; + rLoc = 23463; + rType = 0; + vrLen = 635; + vrLoc = 828; + }; + B649E13D11E2BC7A0061921F /* VT52View.mm:460 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = B67606D311DEDB4100D6B66C /* VT52View.mm */; + functionName = "-processCharacter:"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 460; + location = 2Term; + modificationTime = 300162433.359401; + originalNumberOfMultipleMatches = 1; + state = 2; + }; + B649E15211E2BF130061921F /* VT52View.mm:107 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = B67606D311DEDB4100D6B66C /* VT52View.mm */; + functionName = "-keyDown:"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 107; + location = 2Term; + modificationTime = 300162433.3597261; + originalNumberOfMultipleMatches = 1; + state = 2; + }; + B649E17111E2C3C50061921F /* VT52View.mm:598 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = B67606D311DEDB4100D6B66C /* VT52View.mm */; + functionName = "-processCharacter:"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 598; + location = 2Term; + modificationTime = 300162433.360043; + originalNumberOfMultipleMatches = 1; + state = 2; + }; + B649E17311E2C3C80061921F /* VT52View.mm:607 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = B67606D311DEDB4100D6B66C /* VT52View.mm */; + functionName = "-processCharacter:"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 607; + location = 2Term; + modificationTime = 300162433.360378; + originalNumberOfMultipleMatches = 1; + state = 2; + }; + B649E18B11E2CC4A0061921F /* VT52View.mm:170 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = B67606D311DEDB4100D6B66C /* VT52View.mm */; + functionName = "-keyDown:"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 170; + location = 2Term; + modificationTime = 300162433.360708; + originalNumberOfMultipleMatches = 1; + state = 2; + }; + B649E19511E2CC800061921F /* VT52View.mm:113 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = B67606D311DEDB4100D6B66C /* VT52View.mm */; + functionName = "-keyDown:"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 113; + location = 2Term; + modificationTime = 300162433.36103; + originalNumberOfMultipleMatches = 1; + state = 2; + }; + B649E1B211E2CDDE0061921F /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B67606D911DF6DAB00D6B66C /* EmulatorView.mm */; + name = "EmulatorView.mm: 56"; + rLen = 0; + rLoc = 869; + rType = 0; + vrLen = 396; + vrLoc = 597; + }; + B65FA27911E29E8D00EB447E /* EmulatorView.mm:64 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = B67606D911DF6DAB00D6B66C /* EmulatorView.mm */; + functionName = "-drawRect:"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 64; + location = 2Term; + modificationTime = 300162433.359032; + originalNumberOfMultipleMatches = 1; + state = 2; + }; + B65FA28111E29EDE00EB447E /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B6EBE2B311E0EA9100EA0458 /* CharacterGenerator.h */; + name = "CharacterGenerator.h: 18"; + rLen = 0; + rLoc = 289; + rType = 0; + vrLen = 360; + vrLoc = 0; + }; + B65FA2AD11E29F9300EB447E /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B67606D811DF6DAB00D6B66C /* EmulatorView.h */; + name = "EmulatorView.h: 45"; + rLen = 0; + rLoc = 826; + rType = 0; + vrLen = 578; + vrLoc = 567; + }; + B65FA2B411E29F9A00EB447E /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 256AC3D90F4B6AC300CF3369 /* TwoTermAppDelegate.m */; + name = "TwoTermAppDelegate.m: 36"; + rLen = 0; + rLoc = 778; + rType = 0; + vrLen = 778; + vrLoc = 0; + }; + B65FA2FE11E2A5D200EB447E /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B65FA2FF11E2A5D200EB447E /* stl_vector.h */; + name = "stl_vector.h: 602"; + rLen = 0; + rLoc = 20767; + rType = 0; + vrLen = 648; + vrLoc = 20466; + }; + B65FA2FF11E2A5D200EB447E /* stl_vector.h */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = stl_vector.h; + path = "/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/bits/stl_vector.h"; + sourceTree = ""; + }; + B676053511DADB8100D6B66C /* 2Term */ = { + isa = PBXExecutable; + activeArgIndices = ( + ); + argumentStrings = ( + ); + autoAttachOnCrash = 1; + breakpointsEnabled = 1; + configStateDict = { + }; + customDataFormattersEnabled = 1; + dataTipCustomDataFormattersEnabled = 1; + dataTipShowTypeColumn = 1; + dataTipSortType = 0; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + executableSystemSymbolLevel = 0; + executableUserSymbolLevel = 0; + libgmallocEnabled = 0; + name = 2Term; + savedGlobals = { + }; + showTypeColumn = 0; + sourceDirectories = ( + ); + variableFormatDictionary = { + }; + }; + B676054811DADB9100D6B66C /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + B676054911DADB9100D6B66C /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + B676058811DAE21100D6B66C /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 29B97316FDCFA39411CA2CEA /* main.m */; + name = "main.m: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 256; + vrLoc = 0; + }; + B676058911DAE21100D6B66C /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B676058A11DAE21100D6B66C /* Cocoa.h */; + name = "Cocoa.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 485; + vrLoc = 0; + }; + B676058A11DAE21100D6B66C /* Cocoa.h */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = Cocoa.h; + path = /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h; + sourceTree = ""; + }; + B676058B11DAE21100D6B66C /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 8D1107310486CEB800E47090 /* TwoTerm-Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + ); + name = "/Users/kelvin/Projects/2Term/TwoTerm-Info.plist"; + rLen = 0; + rLoc = 9223372036854775808; + }; + B676058C11DAE21100D6B66C /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 256AC3F00F4B6AF500CF3369 /* TwoTerm_Prefix.pch */; + name = "TwoTerm_Prefix.pch: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 141; + vrLoc = 0; + }; + B67605BA11DAE85700D6B66C /* NSObjCRuntime.h */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = NSObjCRuntime.h; + path = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h; + sourceTree = ""; + }; + B676060711DD4FA600D6B66C /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B67605BA11DAE85700D6B66C /* NSObjCRuntime.h */; + name = "NSObjCRuntime.h: 180"; + rLen = 0; + rLoc = 6179; + rType = 0; + vrLen = 522; + vrLoc = 0; + }; + B676062F11DE96AE00D6B66C /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 256AC3D80F4B6AC300CF3369 /* TwoTermAppDelegate.h */; + name = "TwoTermAppDelegate.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 397; + vrLoc = 0; + }; + B676063911DEAD3500D6B66C /* TermWindowController.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1249, 978}}"; + sepNavSelRange = "{175, 0}"; + sepNavVisRange = "{0, 343}"; + }; + }; + B676063A11DEAD3500D6B66C /* TermWindowController.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {653, 1261}}"; + sepNavSelRange = "{492, 0}"; + sepNavVisRange = "{948, 685}"; + }; + }; + B676064811DEB80600D6B66C /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B676063911DEAD3500D6B66C /* TermWindowController.h */; + name = "TermWindowController.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 374; + vrLoc = 0; + }; + B676066111DEBFB000D6B66C /* TwoTermAppDelegate.m:35 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = 256AC3D90F4B6AC300CF3369 /* TwoTermAppDelegate.m */; + functionName = "-applicationDidFinishLaunching:"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 35; + location = 2Term; + modificationTime = 300162433.356804; + originalNumberOfMultipleMatches = 1; + state = 2; + }; + B676066711DEC06900D6B66C /* TermWindowController.m:31 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = B676063A11DEAD3500D6B66C /* TermWindowController.m */; + functionName = "-awakeFromNib"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 31; + location = 2Term; + modificationTime = 300162433.357529; + originalNumberOfMultipleMatches = 1; + state = 2; + }; + B676069511DEC97D00D6B66C /* TermWindowController.m:97 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = B676063A11DEAD3500D6B66C /* TermWindowController.m */; + functionName = "-readPTY"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 97; + location = 2Term; + modificationTime = 300162433.357888; + originalNumberOfMultipleMatches = 1; + state = 2; + }; + B67606B011DECD4E00D6B66C /* TermWindowController.m:97 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = B676063A11DEAD3500D6B66C /* TermWindowController.m */; + functionName = "-readPTY"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 97; + location = 2Term; + modificationTime = 300162433.358252; + originalNumberOfMultipleMatches = 1; + state = 2; + }; + B67606C811DED91C00D6B66C /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B67606C911DED91C00D6B66C /* poll.h */; + name = "poll.h: 90"; + rLen = 61; + rLoc = 4064; + rType = 0; + vrLen = 275; + vrLoc = 4393; + }; + B67606C911DED91C00D6B66C /* poll.h */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = poll.h; + path = /Developer/SDKs/MacOSX10.6.sdk/usr/include/sys/poll.h; + sourceTree = ""; + }; + B67606D211DEDB4100D6B66C /* VT52View.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1249, 978}}"; + sepNavSelRange = "{514, 0}"; + sepNavVisRange = "{0, 515}"; + }; + }; + B67606D311DEDB4100D6B66C /* VT52View.mm */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1249, 8684}}"; + sepNavSelRange = "{3570, 521}"; + sepNavVisRange = "{8318, 1919}"; + }; + }; + B67606D811DF6DAB00D6B66C /* EmulatorView.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1249, 1040}}"; + sepNavSelRange = "{826, 0}"; + sepNavVisRange = "{32, 1378}"; + }; + }; + B67606D911DF6DAB00D6B66C /* EmulatorView.mm */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {653, 2418}}"; + sepNavSelRange = "{869, 0}"; + sepNavVisRange = "{597, 396}"; + }; + }; + B676070811DF8F4100D6B66C /* TermWindowController.m:97 */ = { + isa = PBXFileBreakpoint; + actions = ( + ); + breakpointStyle = 0; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + fileReference = B676063A11DEAD3500D6B66C /* TermWindowController.m */; + functionName = "-keyDown:"; + hitCount = 0; + ignoreCount = 0; + lineNumber = 97; + modificationTime = 300162443.237363; + originalNumberOfMultipleMatches = 1; + state = 1; + }; + B699A02E11E528BC00F54CC8 /* Screen.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1249, 1664}}"; + sepNavSelRange = "{652, 155}"; + sepNavVisRange = "{0, 1466}"; + }; + }; + B699A02F11E528BC00F54CC8 /* Screen.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1249, 3198}}"; + sepNavSelRange = "{1592, 0}"; + sepNavVisRange = "{277, 1316}"; + }; + }; + B699A03211E528DE00F54CC8 /* iGeometry.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1249, 978}}"; + sepNavSelRange = "{818, 0}"; + sepNavVisRange = "{0, 983}"; + }; + }; + B699A05B11E54D4500F54CC8 /* OutputChannel.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {653, 468}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 620}"; + }; + }; + B699A05C11E54D4500F54CC8 /* OutputChannel.cpp */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1249, 978}}"; + sepNavSelRange = "{595, 0}"; + sepNavVisRange = "{0, 1348}"; + }; + }; + B699A08B11E5720F00F54CC8 /* Emulator.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {663, 432}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 497}"; + }; + }; + B699A08F11E572A300F54CC8 /* VT52.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1249, 978}}"; + sepNavSelRange = "{383, 0}"; + sepNavVisRange = "{0, 390}"; + }; + }; + B699A09011E572A300F54CC8 /* VT52.mm */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {653, 5967}}"; + sepNavSelRange = "{11766, 0}"; + sepNavVisRange = "{6465, 1113}"; + }; + }; + B699A0BE11E58D3B00F54CC8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B676063A11DEAD3500D6B66C /* TermWindowController.m */; + name = "TermWindowController.m: 30"; + rLen = 0; + rLoc = 492; + rType = 0; + vrLen = 685; + vrLoc = 948; + }; + B699A0BF11E58D3B00F54CC8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B699A02E11E528BC00F54CC8 /* Screen.h */; + name = "Screen.h: 19"; + rLen = 0; + rLoc = 284; + rType = 0; + vrLen = 564; + vrLoc = 16; + }; + B699A0C011E58D3B00F54CC8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B699A02F11E528BC00F54CC8 /* Screen.cpp */; + name = "Screen.cpp: 160"; + rLen = 0; + rLoc = 3566; + rType = 0; + vrLen = 881; + vrLoc = 2845; + }; + B699A0C111E58D3B00F54CC8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B699A03211E528DE00F54CC8 /* iGeometry.h */; + name = "iGeometry.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 550; + vrLoc = 0; + }; + B699A0C211E58D3B00F54CC8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B699A05C11E54D4500F54CC8 /* OutputChannel.cpp */; + name = "OutputChannel.cpp: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 177; + vrLoc = 0; + }; + B699A0C311E58D3B00F54CC8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B699A05B11E54D4500F54CC8 /* OutputChannel.h */; + name = "OutputChannel.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 620; + vrLoc = 0; + }; + B699A0C411E58D3B00F54CC8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B6F444C711E41AC000C3A836 /* VT05.mm */; + name = "VT05.mm: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 532; + vrLoc = 0; + }; + B699A0C511E58D3B00F54CC8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B699A08B11E5720F00F54CC8 /* Emulator.h */; + name = "Emulator.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 497; + vrLoc = 0; + }; + B699A0C611E58D3B00F54CC8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B699A08F11E572A300F54CC8 /* VT52.h */; + name = "VT52.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 339; + vrLoc = 0; + }; + B699A0C711E58D3B00F54CC8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B699A09011E572A300F54CC8 /* VT52.mm */; + name = "VT52.mm: 392"; + rLen = 0; + rLoc = 11766; + rType = 0; + vrLen = 1113; + vrLoc = 6465; + }; + B699A0C811E58D3B00F54CC8 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B699A09011E572A300F54CC8 /* VT52.mm */; + name = "VT52.mm: 395"; + rLen = 0; + rLoc = 11766; + rType = 0; + vrLen = 1113; + vrLoc = 6465; + }; + B6EBE2B311E0EA9100EA0458 /* CharacterGenerator.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {653, 468}}"; + sepNavSelRange = "{289, 0}"; + sepNavVisRange = "{0, 360}"; + }; + }; + B6EBE2B411E0EA9100EA0458 /* CharacterGenerator.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1249, 17602}}"; + sepNavSelRange = "{23301, 0}"; + sepNavVisRange = "{22129, 1885}"; + }; + }; + B6EBE2CA11E0FF3E00EA0458 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B67606D211DEDB4100D6B66C /* VT52View.h */; + name = "VT52View.h: 23"; + rLen = 0; + rLoc = 475; + rType = 0; + vrLen = 515; + vrLoc = 0; + }; + B6F444C611E41AC000C3A836 /* VT05.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1249, 978}}"; + sepNavSelRange = "{387, 0}"; + sepNavVisRange = "{0, 387}"; + }; + }; + B6F444C711E41AC000C3A836 /* VT05.mm */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1249, 3016}}"; + sepNavSelRange = "{5073, 0}"; + sepNavVisRange = "{3747, 2067}"; + }; + }; + B6F444CD11E41C7200C3A836 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B67606D311DEDB4100D6B66C /* VT52View.mm */; + name = "VT52View.mm: 147"; + rLen = 0; + rLoc = 2820; + rType = 0; + vrLen = 772; + vrLoc = 1448; + }; + B6F444CF11E41C7200C3A836 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B6F444C611E41AC000C3A836 /* VT05.h */; + name = "VT05.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 198; + vrLoc = 0; + }; +} diff --git a/2Term.xcodeproj/kelvin.perspectivev3 b/2Term.xcodeproj/kelvin.perspectivev3 new file mode 100644 index 0000000..c98c4de --- /dev/null +++ b/2Term.xcodeproj/kelvin.perspectivev3 @@ -0,0 +1,1511 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + AIODescriptionKey + DockingSystemVisible + + Extension + perspectivev3 + FavBarConfig + + PBXProjectModuleGUID + B676054711DADB9000D6B66C + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.defaultV3 + MajorVersion + 34 + MinorVersion + 0 + Name + All-In-One + Notifications + + OpenEditors + + PerspectiveWidths + + 1060 + 1060 + + Perspectives + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + action + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CA23ED40692098700951B8B + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 324 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 080E96DDFE201D6D7F000001 + 29B97315FDCFA39411CA2CEA + 29B97317FDCFA39411CA2CEA + 1DDD58140DA1D0A300B32029 + 29B97323FDCFA39411CA2CEA + 1C37FBAC04509CD000000102 + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 15 + 1 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {324, 843}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + + GeometryConfiguration + + Frame + {{0, 0}, {341, 861}} + GroupTreeTableConfiguration + + MainColumn + 324 + + RubberWindowFrame + 156 170 1060 902 0 0 1920 1178 + + Module + PBXSmartGroupTreeModule + Proportion + 341pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + B676054211DADB9000D6B66C + PBXProjectModuleLabel + VT52.mm + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + B676054311DADB9000D6B66C + PBXProjectModuleLabel + VT52.mm + _historyCapacity + 0 + bookmark + B699A0C811E58D3B00F54CC8 + history + + B676058811DAE21100D6B66C + B676058911DAE21100D6B66C + B676058B11DAE21100D6B66C + B676058C11DAE21100D6B66C + B676060711DD4FA600D6B66C + B676062F11DE96AE00D6B66C + B676064811DEB80600D6B66C + B67606C811DED91C00D6B66C + B6EBE2CA11E0FF3E00EA0458 + B65FA28111E29EDE00EB447E + B65FA2AD11E29F9300EB447E + B65FA2B411E29F9A00EB447E + B65FA2FE11E2A5D200EB447E + B649E0B511E2A88D0061921F + B649E1B211E2CDDE0061921F + B6F444CD11E41C7200C3A836 + B6F444CF11E41C7200C3A836 + B699A0BE11E58D3B00F54CC8 + B699A0BF11E58D3B00F54CC8 + B699A0C011E58D3B00F54CC8 + B699A0C111E58D3B00F54CC8 + B699A0C211E58D3B00F54CC8 + B699A0C311E58D3B00F54CC8 + B699A0C411E58D3B00F54CC8 + B699A0C511E58D3B00F54CC8 + B699A0C611E58D3B00F54CC8 + B699A0C711E58D3B00F54CC8 + + + SplitCount + 1 + + StatusBarVisibility + + XCSharingToken + com.apple.Xcode.CommonNavigatorGroupSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {714, 464}} + RubberWindowFrame + 156 170 1060 902 0 0 1920 1178 + + Module + PBXNavigatorGroup + Proportion + 464pt + + + Proportion + 392pt + Tabs + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EDF0692099D00951B8B + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{10, 27}, {714, 365}} + + Module + XCDetailModule + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA23EE00692099D00951B8B + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXProjectFindModule + + + ContentConfiguration + + PBXCVSModuleFilterTypeKey + 1032 + PBXProjectModuleGUID + 1CA23EE10692099D00951B8B + PBXProjectModuleLabel + SCM Results + + GeometryConfiguration + + Frame + {{10, 31}, {603, 297}} + + Module + PBXCVSModule + + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{10, 27}, {714, 365}} + RubberWindowFrame + 156 170 1060 902 0 0 1920 1178 + + Module + PBXBuildResultsModule + + + + + Proportion + 714pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDockableTabModule + XCDetailModule + PBXProjectFindModule + PBXCVSModule + PBXBuildResultsModule + + TableOfContents + + B699A0C911E58D3B00F54CC8 + 1CA23ED40692098700951B8B + B699A0CA11E58D3B00F54CC8 + B676054211DADB9000D6B66C + B699A0CB11E58D3B00F54CC8 + 1CA23EDF0692099D00951B8B + 1CA23EE00692099D00951B8B + 1CA23EE10692099D00951B8B + XCMainBuildResultsModuleGUID + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ChosenToolbarItems + + XCToolbarPerspectiveControl + NSToolbarSeparatorItem + active-combo-popup + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + debugger-restart-executable + debugger-pause + debugger-step-over + debugger-step-into + debugger-step-out + NSToolbarFlexibleSpaceItem + servicesModulebreakpoints + debugger-show-console-window + + ControllerClassBaseName + PBXDebugSessionModule + IconName + DebugTabIcon + Identifier + perspective.debug + IsVertical + + Layout + + + ContentConfiguration + + PBXProjectModuleGUID + 1CCC7628064C1048000F2A68 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {1060, 279}} + + Module + PBXDebugCLIModule + Proportion + 279pt + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {517, 281}} + {{517, 0}, {543, 281}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {1060, 281}} + {{0, 281}, {1060, 296}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1CCC7629064C1048000F2A68 + PBXProjectModuleLabel + Debug + + GeometryConfiguration + + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 284}, {1060, 577}} + PBXDebugSessionStackFrameViewKey + + DebugVariablesTableConfiguration + + Name + 120 + Value + 85 + Summary + 313 + + Frame + {{517, 0}, {543, 281}} + + + Module + PBXDebugSessionModule + Proportion + 577pt + + + Name + Debug + ServiceClasses + + XCModuleDock + PBXDebugCLIModule + PBXDebugSessionModule + PBXDebugProcessAndThreadModule + PBXDebugProcessViewModule + PBXDebugThreadViewModule + PBXDebugStackFrameViewModule + PBXNavigatorGroup + + TableOfContents + + B699A0CC11E58D3B00F54CC8 + 1CCC7628064C1048000F2A68 + 1CCC7629064C1048000F2A68 + B699A0CD11E58D3B00F54CC8 + B699A0CE11E58D3B00F54CC8 + B699A0CF11E58D3B00F54CC8 + B699A0D011E58D3B00F54CC8 + B699A0D111E58D3B00F54CC8 + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.debugV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 1 + Type + Perspectives + UpdateMessage + + WindowJustification + 5 + WindowOrderList + + /Users/kelvin/Projects/2Term/2Term.xcodeproj + B699A0D211E58D3B00F54CC8 + + WindowString + 156 170 1060 902 0 0 1920 1178 + WindowToolsV3 + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 100% + + + Proportion + 100% + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + 0 + + + Identifier + windowTool.build + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD052900623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {500, 215}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 218pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + + GeometryConfiguration + + Frame + {{0, 222}, {500, 236}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 458pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAA5065D492600B07095 + 1C78EAA6065D492600B07095 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowString + 192 257 500 500 0 0 1280 1002 + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + FirstTimeWindowDisplayed + + Identifier + windowTool.debuggerConsole + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {440, 359}} + RubberWindowFrame + 592 679 440 400 0 0 1920 1178 + + Module + PBXDebugCLIModule + Proportion + 359pt + + + Proportion + 359pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + + TableOfContents + + 1C530D5B069F1CE1000CFCEE + B649E1EA11E2DC510061921F + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 592 679 440 400 0 0 1920 1178 + WindowToolGUID + 1C530D5B069F1CE1000CFCEE + WindowToolIsVisible + + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.09500122070312 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scmV3 + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 166pt + + + Proportion + 166pt + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {369, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {616, 353}} + MembersFrame + {{0, 105}, {369, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 94 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 597 125 616 374 0 0 1280 1002 + + Module + PBXClassBrowserModule + Proportion + 354pt + + + Proportion + 354pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C78EABA065D492600B07095 + 1C78EABB065D492600B07095 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 597 125 616 374 0 0 1280 1002 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/2Term.xcodeproj/project.pbxproj b/2Term.xcodeproj/project.pbxproj new file mode 100644 index 0000000..59d1ad7 --- /dev/null +++ b/2Term.xcodeproj/project.pbxproj @@ -0,0 +1,347 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; }; + 256AC3DA0F4B6AC300CF3369 /* TwoTermAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* TwoTermAppDelegate.m */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; + B676063B11DEAD3500D6B66C /* TermWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = B676063A11DEAD3500D6B66C /* TermWindowController.m */; }; + B676065111DEBAE900D6B66C /* TermWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = B676065011DEBAE900D6B66C /* TermWindow.xib */; }; + B67606D411DEDB4100D6B66C /* VT52View.mm in Sources */ = {isa = PBXBuildFile; fileRef = B67606D311DEDB4100D6B66C /* VT52View.mm */; }; + B67606DA11DF6DAB00D6B66C /* EmulatorView.mm in Sources */ = {isa = PBXBuildFile; fileRef = B67606D911DF6DAB00D6B66C /* EmulatorView.mm */; }; + B699A03011E528BC00F54CC8 /* Screen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B699A02F11E528BC00F54CC8 /* Screen.cpp */; }; + B699A05D11E54D4500F54CC8 /* OutputChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B699A05C11E54D4500F54CC8 /* OutputChannel.cpp */; }; + B699A09111E572A300F54CC8 /* VT52.mm in Sources */ = {isa = PBXBuildFile; fileRef = B699A09011E572A300F54CC8 /* VT52.mm */; }; + B6EBE2B511E0EA9100EA0458 /* CharacterGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EBE2B411E0EA9100EA0458 /* CharacterGenerator.m */; }; + B6F444C811E41AC000C3A836 /* VT05.mm in Sources */ = {isa = PBXBuildFile; fileRef = B6F444C711E41AC000C3A836 /* VT05.mm */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; + 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 256AC3D80F4B6AC300CF3369 /* TwoTermAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TwoTermAppDelegate.h; sourceTree = ""; }; + 256AC3D90F4B6AC300CF3369 /* TwoTermAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TwoTermAppDelegate.m; sourceTree = ""; }; + 256AC3F00F4B6AF500CF3369 /* TwoTerm_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TwoTerm_Prefix.pch; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* TwoTerm-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TwoTerm-Info.plist"; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* 2Term.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = 2Term.app; sourceTree = BUILT_PRODUCTS_DIR; }; + B676063911DEAD3500D6B66C /* TermWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TermWindowController.h; sourceTree = ""; }; + B676063A11DEAD3500D6B66C /* TermWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TermWindowController.m; sourceTree = ""; }; + B676064D11DEBAE300D6B66C /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/TermWindow.xib; sourceTree = ""; }; + B67606D211DEDB4100D6B66C /* VT52View.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VT52View.h; sourceTree = ""; }; + B67606D311DEDB4100D6B66C /* VT52View.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = VT52View.mm; sourceTree = ""; }; + B67606D811DF6DAB00D6B66C /* EmulatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmulatorView.h; sourceTree = ""; }; + B67606D911DF6DAB00D6B66C /* EmulatorView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EmulatorView.mm; sourceTree = ""; }; + B699A02E11E528BC00F54CC8 /* Screen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Screen.h; sourceTree = ""; }; + B699A02F11E528BC00F54CC8 /* Screen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Screen.cpp; sourceTree = ""; }; + B699A03211E528DE00F54CC8 /* iGeometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iGeometry.h; sourceTree = ""; }; + B699A05B11E54D4500F54CC8 /* OutputChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutputChannel.h; sourceTree = ""; }; + B699A05C11E54D4500F54CC8 /* OutputChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OutputChannel.cpp; sourceTree = ""; }; + B699A08B11E5720F00F54CC8 /* Emulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Emulator.h; sourceTree = ""; }; + B699A08F11E572A300F54CC8 /* VT52.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VT52.h; sourceTree = ""; }; + B699A09011E572A300F54CC8 /* VT52.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = VT52.mm; sourceTree = ""; }; + B6EBE2B311E0EA9100EA0458 /* CharacterGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CharacterGenerator.h; sourceTree = ""; }; + B6EBE2B411E0EA9100EA0458 /* CharacterGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CharacterGenerator.m; sourceTree = ""; }; + B6F444C611E41AC000C3A836 /* VT05.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VT05.h; sourceTree = ""; }; + B6F444C711E41AC000C3A836 /* VT05.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = VT05.mm; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 256AC3D80F4B6AC300CF3369 /* TwoTermAppDelegate.h */, + 256AC3D90F4B6AC300CF3369 /* TwoTermAppDelegate.m */, + B676063911DEAD3500D6B66C /* TermWindowController.h */, + B676063A11DEAD3500D6B66C /* TermWindowController.m */, + B67606D211DEDB4100D6B66C /* VT52View.h */, + B67606D311DEDB4100D6B66C /* VT52View.mm */, + B67606D811DF6DAB00D6B66C /* EmulatorView.h */, + B67606D911DF6DAB00D6B66C /* EmulatorView.mm */, + B6EBE2B311E0EA9100EA0458 /* CharacterGenerator.h */, + B6EBE2B411E0EA9100EA0458 /* CharacterGenerator.m */, + B6F444C611E41AC000C3A836 /* VT05.h */, + B699A08B11E5720F00F54CC8 /* Emulator.h */, + B699A08F11E572A300F54CC8 /* VT52.h */, + B699A09011E572A300F54CC8 /* VT52.mm */, + B6F444C711E41AC000C3A836 /* VT05.mm */, + B699A02E11E528BC00F54CC8 /* Screen.h */, + B699A02F11E528BC00F54CC8 /* Screen.cpp */, + B699A03211E528DE00F54CC8 /* iGeometry.h */, + B699A05B11E54D4500F54CC8 /* OutputChannel.h */, + B699A05C11E54D4500F54CC8 /* OutputChannel.cpp */, + ); + name = Classes; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* 2Term.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* 2Term */ = { + isa = PBXGroup; + children = ( + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = 2Term; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 256AC3F00F4B6AF500CF3369 /* TwoTerm_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 8D1107310486CEB800E47090 /* TwoTerm-Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + 1DDD58140DA1D0A300B32029 /* MainMenu.xib */, + B676065011DEBAE900D6B66C /* TermWindow.xib */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* 2Term */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "2Term" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = 2Term; + productInstallPath = "$(HOME)/Applications"; + productName = 2Term; + productReference = 8D1107320486CEB800E47090 /* 2Term.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "2Term" */; + compatibilityVersion = "Xcode 3.1"; + hasScannedForEncodings = 1; + mainGroup = 29B97314FDCFA39411CA2CEA /* 2Term */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* 2Term */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */, + B676065111DEBAE900D6B66C /* TermWindow.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + 256AC3DA0F4B6AC300CF3369 /* TwoTermAppDelegate.m in Sources */, + B676063B11DEAD3500D6B66C /* TermWindowController.m in Sources */, + B67606D411DEDB4100D6B66C /* VT52View.mm in Sources */, + B67606DA11DF6DAB00D6B66C /* EmulatorView.mm in Sources */, + B6EBE2B511E0EA9100EA0458 /* CharacterGenerator.m in Sources */, + B6F444C811E41AC000C3A836 /* VT05.mm in Sources */, + B699A03011E528BC00F54CC8 /* Screen.cpp in Sources */, + B699A05D11E54D4500F54CC8 /* OutputChannel.cpp in Sources */, + B699A09111E572A300F54CC8 /* VT52.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 1DDD58150DA1D0A300B32029 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; + B676065011DEBAE900D6B66C /* TermWindow.xib */ = { + isa = PBXVariantGroup; + children = ( + B676064D11DEBAE300D6B66C /* English */, + ); + name = TermWindow.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = TwoTerm_Prefix.pch; + INFOPLIST_FILE = "TwoTerm-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = 2Term; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = _Term_Prefix.pch; + INFOPLIST_FILE = "TwoTerm-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = 2Term; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; + PREBINDING = NO; + SDKROOT = macosx10.6; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + SDKROOT = macosx10.6; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "2Term" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "2Term" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/CharacterGenerator.h b/CharacterGenerator.h new file mode 100644 index 0000000..51c5a99 --- /dev/null +++ b/CharacterGenerator.h @@ -0,0 +1,22 @@ +// +// CharacterGenerator.h +// 2Term +// +// Created by Kelvin Sherlock on 7/4/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#import + + +@interface CharacterGenerator : NSObject { + + unsigned _base; + NSArray *_characters; +} + ++(CharacterGenerator *)generator; + +-(NSImage *)imageForCharacter: (unsigned)character; + +@end diff --git a/CharacterGenerator.m b/CharacterGenerator.m new file mode 100644 index 0000000..f0c3eb2 --- /dev/null +++ b/CharacterGenerator.m @@ -0,0 +1,1343 @@ +// +// CharacterGenerator.mm +// 2Term +// +// Created by Kelvin Sherlock on 7/4/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#import "CharacterGenerator.h" + + +static uint16_t chars[] = { + + // [space] + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + + // ! + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000000000000000, + 0b0000001100000000, + 0b0000000000000000, + + // " + 0b0000110011000000, + 0b0000110011000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + + // # + 0b0000110011000000, + 0b0000110011000000, + 0b0011111111110000, + 0b0000110011000000, + 0b0011111111110000, + 0b0000110011000000, + 0b0000110011000000, + 0b0000000000000000, + + // $ + 0b0000001100000000, + 0b0000111111110000, + 0b0011001100000000, + 0b0000111111000000, + 0b0000001100110000, + 0b0011111111000000, + 0b0000001100000000, + 0b0000000000000000, + + // % + 0b0011110000000000, + 0b0011110000110000, + 0b0000000011000000, + 0b0000001100000000, + 0b0000110000000000, + 0b0011000011110000, + 0b0000000011110000, + 0b0000000000000000, + + + // & + 0b0000110000000000, + 0b0011001100000000, + 0b0011001100000000, + 0b0000110000000000, + 0b0011001100110000, + 0b0011000011000000, + 0b0000111100110000, + 0b0000000000000000, + + // ' + 0b0000001100000000, + 0b0000001100000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + // ( + + 0b0000001100000000, + 0b0000110000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0000110000000000, + 0b0000001100000000, + 0b0000000000000000, + + // ) + + 0b0000001100000000, + 0b0000000011000000, + 0b0000000000110000, + 0b0000000000110000, + 0b0000000000110000, + 0b0000000011000000, + 0b0000001100000000, + 0b0000000000000000, + + + //* + + 0b0000001100000000, + 0b0011001100110000, + 0b0000111111000000, + 0b0000001100000000, + 0b0000111111000000, + 0b0011001100110000, + 0b0000001100000000, + 0b0000000000000000, + + //+ + + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0011111111110000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000000000000000, + + // , + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000110000000000, + 0b0000000000000000, + + + + // - + + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0011111111110000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + + // . + + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000001100000000, + 0b0000000000000000, + + // / + 0b0000000000000000, + 0b0000000000110000, + 0b0000000011000000, + 0b0000001100000000, + 0b0000110000000000, + 0b0011000000000000, + 0b0000000000000000, + 0b0000000000000000, + + + //0 + 0b0000111111000000, + 0b0011000000110000, + 0b0011000011110000, + 0b0011001100110000, + 0b0011110000110000, + 0b0011000000110000, + 0b0000111111000000, + 0b0000000000000000, + + //1 + 0b0000001100000000, + 0b0000111100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000111111000000, + 0b0000000000000000, + + //2 + 0b0000111111000000, + 0b0011000000110000, + 0b0000000000110000, + 0b0000001111000000, + 0b0000110000000000, + 0b0011000000000000, + 0b0011111111110000, + 0b0000000000000000, + + + //3 + 0b0011111111110000, + 0b0000000000110000, + 0b0000000011000000, + 0b0000001111000000, + 0b0000000000110000, + 0b0011000000110000, + 0b0000111111000000, + 0b0000000000000000, + + //4 + 0b0000000011000000, + 0b0000001111000000, + 0b0000110011000000, + 0b0011000011000000, + 0b0011111111110000, + 0b0000000011000000, + 0b0000000011000000, + 0b0000000000000000, + + //5 + 0b0011111111110000, + 0b0011000000000000, + 0b0011111111000000, + 0b0000000000110000, + 0b0000000000110000, + 0b0011000000110000, + 0b0000111111000000, + 0b0000000000000000, + + //6 + 0b0000001111110000, + 0b0000110000000000, + 0b0011000000000000, + 0b0011111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000111111000000, + 0b0000000000000000, + + //7 + 0b0011111111110000, + 0b0000000000110000, + 0b0000000011000000, + 0b0000001100000000, + 0b0000110000000000, + 0b0000110000000000, + 0b0000110000000000, + 0b0000000000000000, + + //8 + 0b0000111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000111111000000, + 0b0000000000000000, + + //9 + 0b0000111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000111111110000, + 0b0000000000110000, + 0b0000000011000000, + 0b0011111100000000, + 0b0000000000000000, + + //: + 0b0000000000000000, + 0b0000000000000000, + 0b0000001100000000, + 0b0000000000000000, + 0b0000001100000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + + //; + 0b0000000000000000, + 0b0000000000000000, + 0b0000001100000000, + 0b0000000000000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000110000000000, + 0b0000000000000000, + + //< + 0b0000000011000000, + 0b0000001100000000, + 0b0000110000000000, + 0b0011000000000000, + 0b0000110000000000, + 0b0000001100000000, + 0b0000000011000000, + 0b0000000000000000, + + //= + 0b0000000000000000, + 0b0000000000000000, + 0b0011111111110000, + 0b0000000000000000, + 0b0011111111110000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + + //> + 0b0000110000000000, + 0b0000001100000000, + 0b0000000011000000, + 0b0000000000110000, + 0b0000000011000000, + 0b0000001100000000, + 0b0000110000000000, + 0b0000000000000000, + + //? + 0b0000111111000000, + 0b0011000000110000, + 0b0000000011000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000000000000000, + 0b0000001100000000, + 0b0000000000000000, + + + //@ + + 0b0000111111000000, + 0b0011000000110000, + 0b0011001100110000, + 0b0011001100110000, + 0b0011001111000000, + 0b0011000000000000, + 0b0000111111110000, + 0b0000000000000000, + + + + //CHAR_A START + 0b0000001100000000, + 0b0000110011000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011111111110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000000000000000, + + + //CHAR_B START + 0b0011111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011111111000000, + 0b0000000000000000, + + //CHAR_C START + 0b0000111111000000, + 0b0011000000110000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000110000, + 0b0000111111000000, + 0b0000000000000000, + + //CHAR_D START + 0b0011111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011111111000000, + 0b0000000000000000, + + //CHAR_E START + 0b0011111111110000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011111111000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011111111110000, + 0b0000000000000000, + + //CHAR_F START + 0b0011111111110000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011111111000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0000000000000000, + + //CHAR_G START + 0b0000111111110000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000011110000, + 0b0011000000110000, + 0b0000111111110000, + 0b0000000000000000, + + //CHAR_H START + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011111111110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000000000000000, + + //CHAR_I START + 0b0000111111000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000111111000000, + 0b0000000000000000, + + //CHAR_J START + 0b0000000000110000, + 0b0000000000110000, + 0b0000000000110000, + 0b0000000000110000, + 0b0000000000110000, + 0b0011000000110000, + 0b0000111111000000, + 0b0000000000000000, + + //CHAR_K START + 0b0011000011000000, + 0b0011001100000000, + 0b0011110000000000, + 0b0011000000000000, + 0b0011110000000000, + 0b0011001100000000, + 0b0011000011000000, + 0b0000000000000000, + + //CHAR_L START + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011111111110000, + 0b0000000000000000, + + //CHAR_M START + 0b0011000000110000, + 0b0011110011110000, + 0b0011001100110000, + 0b0011001100110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000000000000000, + + //CHAR_N START + 0b0011000000110000, + 0b0011000000110000, + 0b0011110000110000, + 0b0011001100110000, + 0b0011000011110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000000000000000, + + //CHAR_O START + 0b0000111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000111111000000, + 0b0000000000000000, + + //CHAR_P START + 0b0011111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011111111000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0000000000000000, + + //CHAR_Q START + 0b0000111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011001100110000, + 0b0011000011000000, + 0b0000111100110000, + 0b0000000000000000, + + //CHAR_R START + 0b0011111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011111111000000, + 0b0011001100000000, + 0b0011000011000000, + 0b0011000000110000, + 0b0000000000000000, + + //CHAR_S START + 0b0000111111000000, + 0b0011000000110000, + 0b0011000000000000, + 0b0000111111000000, + 0b0000000000110000, + 0b0011000000110000, + 0b0000111111000000, + 0b0000000000000000, + + //CHAR_T START + 0b0011111111110000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000000000000000, + + //CHAR_U START + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000111111000000, + 0b0000000000000000, + + //CHAR_V START + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000110011000000, + 0b0000001100000000, + 0b0000000000000000, + + //CHAR_W START + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011001100110000, + 0b0011001100110000, + 0b0011110011110000, + 0b0011000000110000, + 0b0000000000000000, + + // X + 0b0011000000110000, + 0b0011000000110000, + 0b0000110011000000, + 0b0000001100000000, + 0b0000110011000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000000000000000, + + //CHAR_Y START + 0b0011000000110000, + 0b0011000000110000, + 0b0000110011000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000000000000000, + + //CHAR_Z START + 0b0011111111110000, + 0b0000000000110000, + 0b0000000011000000, + 0b0000001100000000, + 0b0000110000000000, + 0b0011000000000000, + 0b0011111111110000, + 0b0000000000000000, + + // _[_ + 0b0011111111110000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011111111110000, + 0b0000000000000000, + + // backslash + 0b0000000000000000, + 0b0011000000000000, + 0b0000110000000000, + 0b0000001100000000, + 0b0000000011000000, + 0b0000000000110000, + 0b0000000000000000, + 0b0000000000000000, + + // ] + 0b0011111111110000, + 0b0000000000110000, + 0b0000000000110000, + 0b0000000000110000, + 0b0000000000110000, + 0b0000000000110000, + 0b0011111111110000, + 0b0000000000000000, + + // ^ + + 0b0000000000000000, + 0b0000000000000000, + 0b0000001100000000, + 0b0000110011000000, + 0b0011000000110000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + + // _ + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b1111111111111100, + + // ` + 0b0000110000000000, + 0b0000001100000000, + 0b0000000011000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + + + // a + 0b0000000000000000, + 0b0000000000000000, + 0b0000111111000000, + 0b0000000000110000, + 0b0000111111110000, + 0b0011000000110000, + 0b0000111111110000, + 0b0000000000000000, + + //b + 0b0011000000000000, + 0b0011000000000000, + 0b0011111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011111111000000, + 0b0000000000000000, + + //c + 0b0000000000000000, + 0b0000000000000000, + 0b0000111111110000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0000111111110000, + 0b0000000000000000, + + //d + 0b0000000000110000, + 0b0000000000110000, + 0b0000111111110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000111111110000, + 0b0000000000000000, + + //e + 0b0000000000000000, + 0b0000000000000000, + 0b0000111111000000, + 0b0011000000110000, + 0b0011111111110000, + 0b0011000000000000, + 0b0000111111110000, + 0b0000000000000000, + + //f + 0b0000001111000000, + 0b0000110000110000, + 0b0000110000000000, + 0b0011111111000000, + 0b0000110000000000, + 0b0000110000000000, + 0b0000110000000000, + 0b0000000000000000, + + // g + 0b0000000000000000, + 0b0000000000000000, + 0b0000111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000111111110000, + 0b0000000000110000, + 0b0000111111000000, + + //h + 0b0011000000000000, + 0b0011000000000000, + 0b0011111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000000000000000, + + //i + 0b0000001100000000, + 0b0000000000000000, + 0b0000111100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000111111000000, + 0b0000000000000000, + + // j + + 0b0000000011000000, + 0b0000000000000000, + 0b0000001111000000, + 0b0000000011000000, + 0b0000000011000000, + 0b0000000011000000, + 0b0000110011000000, + 0b0000001100000000, + + // k + + 0b0011000000000000, + 0b0011000000000000, + 0b0011000011000000, + 0b0011001100000000, + 0b0011111100000000, + 0b0011000011000000, + 0b0011000000110000, + 0b0000000000000000, + + //l + 0b0000111100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000111111000000, + 0b0000000000000000, + + //m + + 0b0000000000000000, + 0b0000000000000000, + 0b0011110011110000, + 0b0011001100110000, + 0b0011001100110000, + 0b0011001100110000, + 0b0011000000110000, + 0b0000000000000000, + + //n + 0b0000000000000000, + 0b0000000000000000, + 0b0011111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000000000000000, + + + //o + 0b0000000000000000, + 0b0000000000000000, + 0b0000111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000111111000000, + 0b0000000000000000, + + //p + + 0b0000000000000000, + 0b0000000000000000, + 0b0011111111000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011111111000000, + 0b0011000000000000, + 0b0011000000000000, + + //q + + 0b0000000000000000, + 0b0000000000000000, + 0b0000111111110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000111111110000, + 0b0000000000110000, + 0b0000000000110000, + + //r + 0b0000000000000000, + 0b0000000000000000, + 0b0011001111110000, + 0b0011110000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0011000000000000, + 0b0000000000000000, + + //s + + 0b0000000000000000, + 0b0000000000000000, + 0b0000111111110000, + 0b0011000000000000, + 0b0000111111000000, + 0b0000000000110000, + 0b0011111111000000, + 0b0000000000000000, + + //t + 0b0000110000000000, + 0b0000110000000000, + 0b0011111111000000, + 0b0000110000000000, + 0b0000110000000000, + 0b0000110000110000, + 0b0000001111000000, + 0b0000000000000000, + + //u + + 0b0000000000000000, + 0b0000000000000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000011110000, + 0b0000111100110000, + 0b0000000000000000, + + //v + + 0b0000000000000000, + 0b0000000000000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000110011000000, + 0b0000001100000000, + 0b0000000000000000, + + // w + 0b0000000000000000, + 0b0000000000000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011001100110000, + 0b0011001100110000, + 0b0011110011110000, + 0b0000000000000000, + + //x + 0b0000000000000000, + 0b0000000000000000, + 0b0011000000110000, + 0b0000110011000000, + 0b0000001100000000, + 0b0000110011000000, + 0b0011000000110000, + 0b0000000000000000, + + //y + + 0b0000000000000000, + 0b0000000000000000, + 0b0011000000110000, + 0b0011000000110000, + 0b0011000000110000, + 0b0000111111110000, + 0b0000000000110000, + 0b0000111111000000, + + //z + 0b0000000000000000, + 0b0000000000000000, + 0b0011111111110000, + 0b0000000011000000, + 0b0000001100000000, + 0b0000110000000000, + 0b0011111111110000, + 0b0000000000000000, + + //{ + + 0b0000001111110000, + 0b0000111100000000, + 0b0000111100000000, + 0b0011110000000000, + 0b0000111100000000, + 0b0000111100000000, + 0b0000001111110000, + 0b0000000000000000, + + + //| + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + + //} + 0b0011111100000000, + 0b0000001111000000, + 0b0000001111000000, + 0b0000000011110000, + 0b0000001111000000, + 0b0000001111000000, + 0b0011111100000000, + 0b0000000000000000, + + //~ + + 0b0000111100110000, + 0b0011001111000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000 + +}; + + +// mousetext 0x40--0x5f (incomplete) +static uint16_t mousetext[] = { + + // @ -- closed apple + 0b0000000011000000, + 0b0000001100000000, + 0b0011110011110000, + 0b1111111111111100, + 0b1111111111110000, + 0b1111111111110000, + 0b0011111111111100, + 0b0011110011110000, + + // A -- open apple + 0b0000000011000000, + 0b0000001100000000, + 0b0011110011110000, + 0b1100000000001100, + 0b1100000000110000, + 0b1100000000110000, + 0b0011001100001100, + 0b0011110011110000, + + // B -- mouse arrow + 0b0000000000000000, + 0b0000000000000000, + 0b0011000000000000, + 0b0011110000000000, + 0b0011111100000000, + 0b0011111111000000, + 0b0011110011110000, + 0b0011000000001100, + + // C - X + 0b0000000000000000, + 0b0011000000110000, + 0b0000110011000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000110011000000, + 0b0011001100110000, + 0b0000000000000000, + + + // D - checkmark + 0b0000000000000000, + 0b0000000000001100, + 0b0000000000110000, + 0b1100000011000000, + 0b0011001100000000, + 0b0000110000000000, + 0b0000110000000000, + 0b0000000000000000, + + + // E - checkmark (inverted) + + 0b1111111111111100, + 0b1111111111110000, + 0b1111111111001100, + 0b0000111100111100, + 0b1100110011111100, + 0b1111001111111100, + 0b1111001111111100, + 0b1111111111111100, + + // F - running man (part 1) + + 0b0000000011111100, + 0b0000000000111100, + 0b0011111111111100, + 0b1100000011110000, + 0b1100001111111100, + 0b0000000011110000, + 0b1111111111110000, + 0b0011000000000000, + + + // G - running man (part 2) + 0b0000000000000000, + 0b0000001111000000, + 0b1111110000000000, + 0b0000000000000000, + 0b1111110000000000, + 0b0000111100000000, + 0b0000001100000000, + 0b0000000011111100, + + // H - left arrow + + 0b0000001100000000, + 0b0000110000000000, + 0b0011000000000000, + 0b1111111111111100, + 0b0011000000000000, + 0b0000110000000000, + 0b0000001100000000, + 0b0000000000000000, + + // I - ... + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0011001100110000, + + // J - down arrow + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b1100001100001100, + 0b0011001100110000, + 0b0000111111000000, + 0b0000001100000000, + + + // K - up arrow + 0b0000001100000000, + 0b0000111111000000, + 0b0011001100110000, + 0b1100001100001100, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + 0b0000001100000000, + + + + //L + 0b1111111111111100, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b1111111111111100, + + // M - return + 0b0000000000001100, + 0b0000000000001100, + 0b0000000000001100, + 0b0000110000001100, + 0b0011110000001100, + 0b1111111111111100, + 0b0011110000000000, + 0b0000110000000000, + + // N + 0b1111111111110000, + 0b1111111111110000, + 0b1111111111110000, + 0b1111111111110000, + 0b1111111111110000, + 0b1111111111110000, + 0b1111111111110000, + 0b1111111111110000, + + + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + 0b0000000000000000, + +}; + + + + +const unsigned NumChars = sizeof(chars) / sizeof(chars[0]) / 8; + + +static void NullRelease(void *info, const void *data, size_t size) +{ +} + + +/* + * 40 character mode. Double the height of each line. + * + * + */ +static uint8_t *char_40() +{ + uint8_t *data; + uint8_t *out; + + unsigned i; + unsigned max = NumChars * 8; + + out = data = (uint8_t *)malloc(NumChars * 16); + + for (i = 0; i < max; ++i) + { + uint16_t x = ~chars[i]; + + + *out++ = x >> 8; + *out++ = x & 0x0f; + + *out++ = x >> 8; + *out++ = x & 0x0f; + } + + return data; +} + + + + + +static NSData *Data_Char80_7x16 = nil; +static NSData *Data_Char40_14x16 = nil; + +static NSArray *Array_Char80_7x16 = nil; +static NSArray *Array_Char40_14x16 = nil; + + +void CreateArray_Char80_7x16() +{ + + + NSImage *images[NumChars]; + + unsigned i; + unsigned mallocSize = NumChars * 16; + unsigned max = NumChars * 8; + + + uint8_t *bytes; + uint8_t *ptr; + + bytes = ptr = (uint8_t *)malloc(mallocSize); + + for (i = 0; i < max; ++i) + { + unsigned j; + uint16_t x = ~chars[i]; + uint8_t y = 0; + + for (j = 0; j < 8; ++j) + { + y <<= 1; + if (x & 0x8000) y |= 0x01; + x <<= 2; + } + + + *ptr++ = y; + *ptr++ = y; + } + + + + Data_Char80_7x16 = [[NSData alloc] initWithBytesNoCopy: bytes length: mallocSize freeWhenDone: YES]; + + for (i = 0; i < NumChars; ++i) + { + CGImageRef img; + CGDataProviderRef provider; + + provider = CGDataProviderCreateWithData(NULL, &bytes[i * 16], 16, &NullRelease); + + img = CGImageMaskCreate(7, // width + 16, // height + 1, // bits per component + 1, // bits per pixel + 1, // bytes per row. + provider, + NULL, // decode array + false // should interpolate + ); + + images[i] = [[[NSImage alloc] initWithCGImage: img size: NSZeroSize] autorelease]; + //[images[i] setFlipped: YES]; + + CGDataProviderRelease(provider); + CGImageRelease(img); + + } + + + Array_Char80_7x16 = [[NSArray alloc] initWithObjects: images count: NumChars]; + +} + + + +@implementation CharacterGenerator + + ++(CharacterGenerator *)generatorWithArray: (NSArray *)array base: (unsigned)base +{ + CharacterGenerator *rv = [self new]; + rv->_base = base; + rv->_characters = [array retain]; + + return [rv autorelease]; +} + ++(CharacterGenerator *)generator +{ + @synchronized (self) + { + if (!Array_Char80_7x16) CreateArray_Char80_7x16(); + + return [CharacterGenerator generatorWithArray: Array_Char80_7x16 base: ' ']; + } +} + +-(NSImage *)imageForCharacter:(unsigned)character +{ + //id o; + if (character < _base) return nil; + + character -= _base; + + if (character >= [_characters count]) return nil; + + //o = [_characters objectAtIndex: character]; + + return [_characters objectAtIndex: character]; +} + + +-(void)dealloc +{ + [_characters release]; + [super dealloc]; +} + + + + + + + +@end diff --git a/Emulator.h b/Emulator.h new file mode 100644 index 0000000..8025814 --- /dev/null +++ b/Emulator.h @@ -0,0 +1,26 @@ +// +// Emulator.h +// 2Term +// +// Created by Kelvin Sherlock on 7/7/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + + +@class NSEvent; + +#ifdef __cplusplus +class Screen; +class OutputChannel; +#else +#define Screen void +#define OutputChannel void; +#endif + +@protocol Emulator + +-(void)processCharacter: (uint8_t)c screen: (Screen *)screen output: (OutputChannel *)output; +-(void)keyDown: (NSEvent *)event screen: (Screen *)screen output: (OutputChannel *)output; +-(void)reset; + +@end diff --git a/EmulatorView.h b/EmulatorView.h new file mode 100644 index 0000000..a901f4b --- /dev/null +++ b/EmulatorView.h @@ -0,0 +1,79 @@ +// +// EmulatorView.h +// 2Term +// +// Created by Kelvin Sherlock on 7/3/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#import + +#ifdef __cplusplus +#include +#endif + +struct CursorPosition { +#ifdef __cplusplus + CursorPosition(int _x, int _y) throw() : x(_x), y(_y) {} + CursorPosition() throw() : x(0), y(0) {} + + bool operator == (const CursorPosition& rhs) throw() + { return rhs.x == x && rhs.y == y; } + + bool operator != (const CursorPosition& rhs) throw() + { return ! (*this == rhs); } + +#endif + int x; + int y; +}; + +struct CharInfo { + char c; + uint8_t flags; +}; + + + +@class CharacterGenerator; + +@interface EmulatorView : NSView { + int _fd; + + /* these should not be modified without locking */ + struct CursorPosition _cursor; + struct CharInfo _screen[24][80]; + + /* end locking */ + + + NSThread *_readerThread; + NSLock *_lock; + + CharacterGenerator *_charGen; + + NSColor *_backgroundColor; + NSColor *_foregroundColor; + + CGFloat _charHeight; + CGFloat _charWidth; + + unsigned _height; + unsigned _width; + + + +#ifdef __cplusplus + + //std::vector< std::vector > _screen; + +#endif +} + +-(void)startBackgroundReader; +-(void)dataAvailable; + +@property (nonatomic, assign) int fd; +@property (nonatomic, assign) struct CursorPosition cursorPosition; + +@end diff --git a/EmulatorView.mm b/EmulatorView.mm new file mode 100644 index 0000000..e9ac340 --- /dev/null +++ b/EmulatorView.mm @@ -0,0 +1,175 @@ +// +// EmulatorView.m +// 2Term +// +// Created by Kelvin Sherlock on 7/3/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#import "EmulatorView.h" + +#import "CharacterGenerator.h" + +@implementation EmulatorView + +@synthesize fd = _fd; +@synthesize cursorPosition = _cursor; + + +-(void)awakeFromNib +{ + _charWidth = 7; + _charHeight = 16; + + _height = 24; + _width = 80; + + _foregroundColor = [[NSColor greenColor] retain]; + _backgroundColor = [[NSColor blackColor] retain]; + + _charGen = [[CharacterGenerator generator] retain]; + + _lock = [NSLock new]; + + + std::memset(_screen, 0, sizeof(_screen)); + + + _cursor = CursorPosition(0, 0); +} + +-(BOOL)isFlipped +{ + return YES; +} + + +-(void)viewDidMoveToWindow +{ + [self becomeFirstResponder]; +} + +-(void)viewDidMoveToSuperview +{ + [self becomeFirstResponder]; +} + +-(BOOL)acceptsFirstResponder +{ + return YES; +} + +-(void)drawRect:(NSRect)dirtyRect +{ + NSRect bounds = [self bounds]; + + + unsigned x, y; + + unsigned minX = floor(dirtyRect.origin.x / _charWidth); + unsigned maxX = ceil((dirtyRect.origin.x + dirtyRect.size.width) / _charWidth); + + unsigned minY = floor(dirtyRect.origin.y / _charHeight); + unsigned maxY = ceil((dirtyRect.origin.y + dirtyRect.size.height) / _charHeight); + + // x/y are 0-indexed here. + + maxY = std::min(_height - 1, maxY); + maxX = std::min(_width - 1, maxX); + + [_backgroundColor setFill]; + NSRectFill(dirtyRect); + + [_foregroundColor setFill]; + + + + + [_lock lock]; + + for (x = minX; x <= maxX; ++x) + { + for (y = minY; y <= maxY; ++y) + { + NSImage *img; + CharInfo ci = _screen[y][x]; + + // todo -- check flags to determine fg/bg color, etc. + + + img = [_charGen imageForCharacter: ci.c]; + + /* + [img drawAtPoint: NSMakePoint(x * _charWidth, y * _charHeight) + fromRect: NSZeroRect + operation:NSCompositeCopy + fraction: 1.0]; + */ + if (img) + { + [img drawInRect: NSMakeRect(x * _charWidth, y *_charHeight, _charWidth, _charHeight) + fromRect: NSZeroRect operation: NSCompositeCopy + fraction: 1.0 + respectFlipped: YES + hints: nil]; + } + } + } + + [_lock unlock]; + +} + + +-(void)dealloc +{ + [_readerThread release]; + [_lock release]; + + [super dealloc]; +} + +-(void)startBackgroundReader +{ + if (_readerThread) return; + + _readerThread = [[NSThread alloc] initWithTarget: self selector: @selector(_readerThread) object: nil]; + + [_readerThread start]; +} +-(void)_readerThread +{ + // I would prefer to poll(2) but it's broken on os x for ptys. + + int fd = _fd; + + + for(;;) + { + int n; + + fd_set read_set; + fd_set error_set; + + FD_ZERO(&read_set); + FD_SET(fd, &read_set); + FD_ZERO(&error_set); + FD_SET(fd, &error_set); + + + n = select(fd + 1, &read_set, NULL, &error_set, NULL); + + if (n == 0) continue; + if (n < 0) break; + + if (FD_ISSET(fd, &error_set)) break; + if (FD_ISSET(fd, &read_set)) [self dataAvailable]; + } + +} + + +-(void)dataAvailable { } + + +@end diff --git a/English.lproj/InfoPlist.strings b/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/English.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib new file mode 100644 index 0000000..0c734d7 --- /dev/null +++ b/English.lproj/MainMenu.xib @@ -0,0 +1,4182 @@ + + + + 1060 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 788 + + + YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + AMainMenu + + YES + + + 2Term + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + 2Term + + YES + + + About 2Term + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + Services + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide 2Term + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit 2Term + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + File + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open… + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + Open Recent + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1179648 + 2147483647 + + + + + + Revert to Saved + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup... + P + 1179648 + 2147483647 + + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + Edit + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1179648 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + Find + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1179648 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling and Grammar + + 1048576 + 2147483647 + + + submenuAction: + + Spelling and Grammar + + YES + + + Show Spelling and Grammar + : + 1048576 + 2147483647 + + + + + + Check Document Now + ; + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Check Spelling While Typing + + 1048576 + 2147483647 + + + + + + Check Grammar With Spelling + + 1048576 + 2147483647 + + + + + + Correct Spelling Automatically + + 2147483647 + + + + + + + + + Substitutions + + 1048576 + 2147483647 + + + submenuAction: + + Substitutions + + YES + + + Show Substitutions + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Smart Copy/Paste + f + 1048576 + 2147483647 + + + 1 + + + + Smart Quotes + g + 1048576 + 2147483647 + + + 2 + + + + Smart Dashes + + 2147483647 + + + + + + Smart Links + G + 1179648 + 2147483647 + + + 3 + + + + Text Replacement + + 2147483647 + + + + + + + + + Transformations + + 2147483647 + + + submenuAction: + + Transformations + + YES + + + Make Upper Case + + 2147483647 + + + + + + Make Lower Case + + 2147483647 + + + + + + Capitalize + + 2147483647 + + + + + + + + + Speech + + 1048576 + 2147483647 + + + submenuAction: + + Speech + + YES + + + Start Speaking + + 1048576 + 2147483647 + + + + + + Stop Speaking + + 1048576 + 2147483647 + + + + + + + + + + + + Format + + 2147483647 + + + submenuAction: + + Format + + YES + + + Font + + 2147483647 + + + submenuAction: + + Font + + YES + + + Show Fonts + t + 1048576 + 2147483647 + + + + + + Bold + b + 1048576 + 2147483647 + + + 2 + + + + Italic + i + 1048576 + 2147483647 + + + 1 + + + + Underline + u + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Bigger + + + 1048576 + 2147483647 + + + 3 + + + + Smaller + - + 1048576 + 2147483647 + + + 4 + + + + YES + YES + + + 2147483647 + + + + + + Kern + + 2147483647 + + + submenuAction: + + Kern + + YES + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Tighten + + 2147483647 + + + + + + Loosen + + 2147483647 + + + + + + + + + Ligature + + 2147483647 + + + submenuAction: + + Ligature + + YES + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Use All + + 2147483647 + + + + + + + + + Baseline + + 2147483647 + + + submenuAction: + + Baseline + + YES + + + Use Default + + 2147483647 + + + + + + Superscript + + 2147483647 + + + + + + Subscript + + 2147483647 + + + + + + Raise + + 2147483647 + + + + + + Lower + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Colors + C + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Copy Style + c + 1572864 + 2147483647 + + + + + + Paste Style + v + 1572864 + 2147483647 + + + + + _NSFontMenu + + + + + Text + + 2147483647 + + + submenuAction: + + Text + + YES + + + Align Left + { + 1048576 + 2147483647 + + + + + + Center + | + 1048576 + 2147483647 + + + + + + Justify + + 2147483647 + + + + + + Align Right + } + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Writing Direction + + 2147483647 + + + submenuAction: + + Writing Direction + + YES + + + YES + Paragraph + + 2147483647 + + + + + + CURlZmF1bHQ + + 2147483647 + + + + + + CUxlZnQgdG8gUmlnaHQ + + 2147483647 + + + + + + CVJpZ2h0IHRvIExlZnQ + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + YES + Selection + + 2147483647 + + + + + + CURlZmF1bHQ + + 2147483647 + + + + + + CUxlZnQgdG8gUmlnaHQ + + 2147483647 + + + + + + CVJpZ2h0IHRvIExlZnQ + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Ruler + + 2147483647 + + + + + + Copy Ruler + c + 1310720 + 2147483647 + + + + + + Paste Ruler + v + 1310720 + 2147483647 + + + + + + + + + + + + View + + 1048576 + 2147483647 + + + submenuAction: + + View + + YES + + + Show Toolbar + t + 1572864 + 2147483647 + + + + + + Customize Toolbar… + + 1048576 + 2147483647 + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + Window + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 2147483647 + + + submenuAction: + + Help + + YES + + + 2Term Help + ? + 1048576 + 2147483647 + + + + + _NSHelpMenu + + + + _NSMainMenu + + + TwoTermAppDelegate + + + NSFontManager + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + clearRecentDocuments: + + + + 127 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + performClose: + + + + 193 + + + + toggleContinuousSpellChecking: + + + + 222 + + + + undo: + + + + 223 + + + + copy: + + + + 224 + + + + checkSpelling: + + + + 225 + + + + paste: + + + + 226 + + + + stopSpeaking: + + + + 227 + + + + cut: + + + + 228 + + + + showGuessPanel: + + + + 230 + + + + redo: + + + + 231 + + + + selectAll: + + + + 232 + + + + startSpeaking: + + + + 233 + + + + delete: + + + + 235 + + + + performZoom: + + + + 240 + + + + performFindPanelAction: + + + + 241 + + + + centerSelectionInVisibleArea: + + + + 245 + + + + toggleGrammarChecking: + + + + 347 + + + + toggleSmartInsertDelete: + + + + 355 + + + + toggleAutomaticQuoteSubstitution: + + + + 356 + + + + toggleAutomaticLinkDetection: + + + + 357 + + + + saveDocument: + + + + 362 + + + + saveDocumentAs: + + + + 363 + + + + revertDocumentToSaved: + + + + 364 + + + + runToolbarCustomizationPalette: + + + + 365 + + + + toggleToolbarShown: + + + + 366 + + + + hide: + + + + 367 + + + + hideOtherApplications: + + + + 368 + + + + unhideAllApplications: + + + + 370 + + + + newDocument: + + + + 373 + + + + openDocument: + + + + 374 + + + + addFontTrait: + + + + 421 + + + + addFontTrait: + + + + 422 + + + + modifyFont: + + + + 423 + + + + orderFrontFontPanel: + + + + 424 + + + + modifyFont: + + + + 425 + + + + raiseBaseline: + + + + 426 + + + + lowerBaseline: + + + + 427 + + + + copyFont: + + + + 428 + + + + subscript: + + + + 429 + + + + superscript: + + + + 430 + + + + tightenKerning: + + + + 431 + + + + underline: + + + + 432 + + + + orderFrontColorPanel: + + + + 433 + + + + useAllLigatures: + + + + 434 + + + + loosenKerning: + + + + 435 + + + + pasteFont: + + + + 436 + + + + unscript: + + + + 437 + + + + useStandardKerning: + + + + 438 + + + + useStandardLigatures: + + + + 439 + + + + turnOffLigatures: + + + + 440 + + + + turnOffKerning: + + + + 441 + + + + terminate: + + + + 449 + + + + toggleAutomaticSpellingCorrection: + + + + 456 + + + + orderFrontSubstitutionsPanel: + + + + 458 + + + + toggleAutomaticDashSubstitution: + + + + 461 + + + + toggleAutomaticTextReplacement: + + + + 463 + + + + uppercaseWord: + + + + 464 + + + + capitalizeWord: + + + + 467 + + + + lowercaseWord: + + + + 468 + + + + pasteAsPlainText: + + + + 486 + + + + performFindPanelAction: + + + + 487 + + + + performFindPanelAction: + + + + 488 + + + + performFindPanelAction: + + + + 489 + + + + showHelp: + + + + 493 + + + + delegate + + + + 495 + + + + alignCenter: + + + + 518 + + + + pasteRuler: + + + + 519 + + + + toggleRuler: + + + + 520 + + + + alignRight: + + + + 521 + + + + copyRuler: + + + + 522 + + + + alignJustified: + + + + 523 + + + + alignLeft: + + + + 524 + + + + makeBaseWritingDirectionNatural: + + + + 525 + + + + makeBaseWritingDirectionLeftToRight: + + + + 526 + + + + makeBaseWritingDirectionRightToLeft: + + + + 527 + + + + makeTextWritingDirectionNatural: + + + + 528 + + + + makeTextWritingDirectionLeftToRight: + + + + 529 + + + + makeTextWritingDirectionRightToLeft: + + + + 530 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + + + + + 19 + + + YES + + + + + + 56 + + + YES + + + + + + 217 + + + YES + + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 75 + + + + + 80 + + + + + 78 + + + + + 72 + + + + + 82 + + + + + 124 + + + YES + + + + + + 77 + + + + + 73 + + + + + 79 + + + + + 112 + + + + + 74 + + + + + 125 + + + YES + + + + + + 126 + + + + + 205 + + + YES + + + + + + + + + + + + + + + + + + + + 202 + + + + + 198 + + + + + 207 + + + + + 214 + + + + + 199 + + + + + 203 + + + + + 197 + + + + + 206 + + + + + 215 + + + + + 218 + + + YES + + + + + + 216 + + + YES + + + + + + 200 + + + YES + + + + + + + + + + + 219 + + + + + 201 + + + + + 204 + + + + + 220 + + + YES + + + + + + + + + + 213 + + + + + 210 + + + + + 221 + + + + + 208 + + + + + 209 + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 134 + + + + + 150 + + + + + 136 + + + + + 144 + + + + + 129 + + + + + 143 + + + + + 236 + + + + + 131 + + + YES + + + + + + 149 + + + + + 145 + + + + + 130 + + + + + 24 + + + YES + + + + + + + + + 92 + + + + + 5 + + + + + 239 + + + + + 23 + + + + + 295 + + + YES + + + + + + 296 + + + YES + + + + + + + 297 + + + + + 298 + + + + + 211 + + + YES + + + + + + 212 + + + YES + + + + + + + 195 + + + + + 196 + + + + + 346 + + + + + 348 + + + YES + + + + + + 349 + + + YES + + + + + + + + + + + + 350 + + + + + 351 + + + + + 354 + + + + + 375 + + + YES + + + + + + 376 + + + YES + + + + + + + 377 + + + YES + + + + + + 388 + + + YES + + + + + + + + + + + + + + + + + + + + + 389 + + + + + 390 + + + + + 391 + + + + + 392 + + + + + 393 + + + + + 394 + + + + + 395 + + + + + 396 + + + + + 397 + + + YES + + + + + + 398 + + + YES + + + + + + 399 + + + YES + + + + + + 400 + + + + + 401 + + + + + 402 + + + + + 403 + + + + + 404 + + + + + 405 + + + YES + + + + + + + + + + 406 + + + + + 407 + + + + + 408 + + + + + 409 + + + + + 410 + + + + + 411 + + + YES + + + + + + + + 412 + + + + + 413 + + + + + 414 + + + + + 415 + + + YES + + + + + + + + + 416 + + + + + 417 + + + + + 418 + + + + + 419 + + + + + 420 + + + + + 450 + + + YES + + + + + + 451 + + + YES + + + + + + + + 452 + + + + + 453 + + + + + 454 + + + + + 457 + + + + + 459 + + + + + 460 + + + + + 462 + + + + + 465 + + + + + 466 + + + + + 485 + + + + + 490 + + + YES + + + + + + 491 + + + YES + + + + + + 492 + + + + + 494 + + + + + 496 + + + YES + + + + + + 497 + + + YES + + + + + + + + + + + + + + + 498 + + + + + 499 + + + + + 500 + + + + + 501 + + + + + 502 + + + + + 503 + + + YES + + + + + + 504 + + + + + 505 + + + + + 506 + + + + + 507 + + + + + 508 + + + YES + + + + + + + + + + + + + + 509 + + + + + 510 + + + + + 511 + + + + + 512 + + + + + 513 + + + + + 514 + + + + + 515 + + + + + 516 + + + + + 517 + + + + + + + YES + + YES + -3.IBPluginDependency + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 125.editorWindowContentRectSynchronizationRect + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 130.editorWindowContentRectSynchronizationRect + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 195.IBPluginDependency + 195.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 198.IBPluginDependency + 198.ImportedFromIB2 + 199.IBPluginDependency + 199.ImportedFromIB2 + 200.IBEditorWindowLastContentRect + 200.IBPluginDependency + 200.ImportedFromIB2 + 200.editorWindowContentRectSynchronizationRect + 201.IBPluginDependency + 201.ImportedFromIB2 + 202.IBPluginDependency + 202.ImportedFromIB2 + 203.IBPluginDependency + 203.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 205.IBEditorWindowLastContentRect + 205.IBPluginDependency + 205.ImportedFromIB2 + 205.editorWindowContentRectSynchronizationRect + 206.IBPluginDependency + 206.ImportedFromIB2 + 207.IBPluginDependency + 207.ImportedFromIB2 + 208.IBPluginDependency + 208.ImportedFromIB2 + 209.IBPluginDependency + 209.ImportedFromIB2 + 210.IBPluginDependency + 210.ImportedFromIB2 + 211.IBPluginDependency + 211.ImportedFromIB2 + 212.IBPluginDependency + 212.ImportedFromIB2 + 212.editorWindowContentRectSynchronizationRect + 213.IBPluginDependency + 213.ImportedFromIB2 + 214.IBPluginDependency + 214.ImportedFromIB2 + 215.IBPluginDependency + 215.ImportedFromIB2 + 216.IBPluginDependency + 216.ImportedFromIB2 + 217.IBPluginDependency + 217.ImportedFromIB2 + 218.IBPluginDependency + 218.ImportedFromIB2 + 219.IBPluginDependency + 219.ImportedFromIB2 + 220.IBEditorWindowLastContentRect + 220.IBPluginDependency + 220.ImportedFromIB2 + 220.editorWindowContentRectSynchronizationRect + 221.IBPluginDependency + 221.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 236.IBPluginDependency + 236.ImportedFromIB2 + 239.IBPluginDependency + 239.ImportedFromIB2 + 24.IBEditorWindowLastContentRect + 24.IBPluginDependency + 24.ImportedFromIB2 + 24.editorWindowContentRectSynchronizationRect + 29.IBEditorWindowLastContentRect + 29.IBPluginDependency + 29.ImportedFromIB2 + 29.WindowOrigin + 29.editorWindowContentRectSynchronizationRect + 295.IBPluginDependency + 296.IBEditorWindowLastContentRect + 296.IBPluginDependency + 296.editorWindowContentRectSynchronizationRect + 297.IBPluginDependency + 298.IBPluginDependency + 346.IBPluginDependency + 346.ImportedFromIB2 + 348.IBPluginDependency + 348.ImportedFromIB2 + 349.IBEditorWindowLastContentRect + 349.IBPluginDependency + 349.ImportedFromIB2 + 349.editorWindowContentRectSynchronizationRect + 350.IBPluginDependency + 350.ImportedFromIB2 + 351.IBPluginDependency + 351.ImportedFromIB2 + 354.IBPluginDependency + 354.ImportedFromIB2 + 375.IBPluginDependency + 376.IBEditorWindowLastContentRect + 376.IBPluginDependency + 377.IBPluginDependency + 388.IBEditorWindowLastContentRect + 388.IBPluginDependency + 389.IBPluginDependency + 390.IBPluginDependency + 391.IBPluginDependency + 392.IBPluginDependency + 393.IBPluginDependency + 394.IBPluginDependency + 395.IBPluginDependency + 396.IBPluginDependency + 397.IBPluginDependency + 398.IBPluginDependency + 399.IBPluginDependency + 400.IBPluginDependency + 401.IBPluginDependency + 402.IBPluginDependency + 403.IBPluginDependency + 404.IBPluginDependency + 405.IBPluginDependency + 406.IBPluginDependency + 407.IBPluginDependency + 408.IBPluginDependency + 409.IBPluginDependency + 410.IBPluginDependency + 411.IBPluginDependency + 412.IBPluginDependency + 413.IBPluginDependency + 414.IBPluginDependency + 415.IBPluginDependency + 416.IBPluginDependency + 417.IBPluginDependency + 418.IBPluginDependency + 419.IBPluginDependency + 450.IBPluginDependency + 451.IBEditorWindowLastContentRect + 451.IBPluginDependency + 452.IBPluginDependency + 453.IBPluginDependency + 454.IBPluginDependency + 457.IBPluginDependency + 459.IBPluginDependency + 460.IBPluginDependency + 462.IBPluginDependency + 465.IBPluginDependency + 466.IBPluginDependency + 485.IBPluginDependency + 490.IBPluginDependency + 491.IBEditorWindowLastContentRect + 491.IBPluginDependency + 492.IBPluginDependency + 496.IBPluginDependency + 497.IBEditorWindowLastContentRect + 497.IBPluginDependency + 498.IBPluginDependency + 499.IBPluginDependency + 5.IBPluginDependency + 5.ImportedFromIB2 + 500.IBPluginDependency + 501.IBPluginDependency + 502.IBPluginDependency + 503.IBPluginDependency + 504.IBPluginDependency + 505.IBPluginDependency + 506.IBPluginDependency + 507.IBPluginDependency + 508.IBEditorWindowLastContentRect + 508.IBPluginDependency + 509.IBPluginDependency + 510.IBPluginDependency + 511.IBPluginDependency + 512.IBPluginDependency + 513.IBPluginDependency + 514.IBPluginDependency + 515.IBPluginDependency + 516.IBPluginDependency + 517.IBPluginDependency + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBEditorWindowLastContentRect + 57.IBPluginDependency + 57.ImportedFromIB2 + 57.editorWindowContentRectSynchronizationRect + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBEditorWindowLastContentRect + 81.IBPluginDependency + 81.ImportedFromIB2 + 81.editorWindowContentRectSynchronizationRect + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{522, 812}, {146, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{436, 809}, {64, 6}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{753, 187}, {275, 113}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {275, 83}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{547, 180}, {254, 283}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{187, 434}, {243, 243}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {167, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{753, 217}, {238, 103}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {241, 103}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{654, 239}, {194, 73}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{525, 802}, {197, 73}} + {{380, 836}, {412, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {74, 862} + {{6, 978}, {478, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + {{604, 269}, {231, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + {{475, 832}, {234, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{746, 287}, {220, 133}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {215, 63}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + {{591, 420}, {83, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{523, 2}, {178, 283}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{753, 197}, {170, 63}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{725, 289}, {246, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{674, 260}, {204, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{878, 180}, {164, 173}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{286, 129}, {275, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{23, 794}, {245, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{452, 109}, {196, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 474}, {199, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 536 + + + + YES + + TwoTermAppDelegate + NSObject + + YES + + YES + imageView + window + + + YES + NSImageView + NSWindow + + + + YES + + YES + imageView + window + + + YES + + imageView + NSImageView + + + window + NSWindow + + + + + IBProjectSource + TwoTermAppDelegate.h + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFontManager + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSImageView + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSImageView.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSTextView + NSText + + IBFrameworkSource + AppKit.framework/Headers/NSTextView.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../2Term.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/English.lproj/TermWindow.xib b/English.lproj/TermWindow.xib new file mode 100644 index 0000000..c412bfe --- /dev/null +++ b/English.lproj/TermWindow.xib @@ -0,0 +1,658 @@ + + + + 1060 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 788 + + + YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + TermWindowController + + + FirstResponder + + + NSApplication + + + 271 + 2 + {{196, 66}, {620, 444}} + 544735232 + Two Term [VT52] + NSWindow + + {1.79769e+308, 1.79769e+308} + + + 256 + + YES + + + 268 + + YES + + + 268 + {{10, 10}, {560, 384}} + + VT52View + + + {{20, 20}, {580, 404}} + + NSView + + + {620, 444} + + + {{0, 0}, {1680, 1028}} + {1.79769e+308, 1.79769e+308} + + + + + YES + + + window + + + + 3 + + + + delegate + + + + 4 + + + + _emulatorView + + + + 6 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + YES + + + + + + 2 + + + YES + + + + + + 7 + + + YES + + + + Back View + + + 5 + + + Emulator View + + + + + YES + + YES + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 1.IBWindowTemplateEditedContentRect + 1.NSWindowTemplate.visibleAtLaunch + 1.WindowOrigin + 1.editorWindowContentRectSynchronizationRect + 2.IBPluginDependency + 5.IBPluginDependency + 7.IBPluginDependency + 7.IBViewIntegration.shadowColor + + + YES + {{367, 306}, {620, 444}} + com.apple.InterfaceBuilder.CocoaPlugin + {{367, 306}, {620, 444}} + + {196, 240} + {{202, 428}, {480, 270}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + 3 + MAA + + + + + YES + + + YES + + + + + YES + + + YES + + + + 8 + + + + YES + + EmulatorView + NSView + + IBProjectSource + EmulatorView.h + + + + TermWindowController + NSWindowController + + _emulatorView + EmulatorView + + + _emulatorView + + _emulatorView + EmulatorView + + + + IBProjectSource + TermWindowController.h + + + + VT52View + EmulatorView + + IBProjectSource + VT52View.h + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + NSWindowController + NSResponder + + showWindow: + id + + + showWindow: + + showWindow: + id + + + + IBFrameworkSource + AppKit.framework/Headers/NSWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../2Term.xcodeproj + 3 + + diff --git a/OutputChannel.cpp b/OutputChannel.cpp new file mode 100644 index 0000000..af12027 --- /dev/null +++ b/OutputChannel.cpp @@ -0,0 +1,75 @@ +/* + * OutputChannel.cpp + * 2Term + * + * Created by Kelvin Sherlock on 7/7/2010. + * Copyright 2010 __MyCompanyName__. All rights reserved. + * + */ + +#include "OutputChannel.h" + +#include +#include +#include +#include + +bool OutputChannel::write(uint8_t c) +{ + return write(&c, 1); +} + +bool OutputChannel::write(const char *str) +{ + return write(str, std::strlen(str)); +} + +bool OutputChannel::write(const void *vp, size_t size) +{ + + if (!size) return true; + + for (unsigned i = 0; ;) + { + ssize_t s = ::write(_fd, vp, size); + + if (s < 0) + { + switch (errno) + { + case EAGAIN: + case EINTR: + if (++i < 3) break; + default: + _error = errno; + // throw? + return false; + } + + } + + else if (size == s) + { + return true; + } + + else if (s == 0) + { + if (++i == 3) + { + _error = EIO; + return false; + } + } + else + { + size -= s; + vp = (uint8_t *)vp + s; + + if (size == 0) return true; + } + + } + + return false; +} \ No newline at end of file diff --git a/OutputChannel.h b/OutputChannel.h new file mode 100644 index 0000000..3308461 --- /dev/null +++ b/OutputChannel.h @@ -0,0 +1,36 @@ +/* + * OutputChannel.h + * 2Term + * + * Created by Kelvin Sherlock on 7/7/2010. + * Copyright 2010 __MyCompanyName__. All rights reserved. + * + */ + +#ifndef __OUTPUT_CHANNEL_H__ +#define __OUTPUT_CHANNEL_H__ + +#include +#include + +class OutputChannel +{ +public: + OutputChannel(int fd) : _fd(fd), _error(0) {}; + + bool write(uint8_t); + bool write(const char *); + bool write(const void *, size_t); + + int error() const { return _error; } + +private: + OutputChannel(const OutputChannel&); + OutputChannel& operator=(const OutputChannel&); + + int _fd; + int _error; +}; + + +#endif \ No newline at end of file diff --git a/Screen.cpp b/Screen.cpp new file mode 100644 index 0000000..ab5217a --- /dev/null +++ b/Screen.cpp @@ -0,0 +1,229 @@ +/* + * Screen.cpp + * 2Term + * + * Created by Kelvin Sherlock on 7/7/2010. + * Copyright 2010 __MyCompanyName__. All rights reserved. + * + */ + +#include "Screen.h" + +#include + +Screen::Screen(unsigned height, unsigned width) +{ + _height = height; + _width = width; + + _flag = 0; + + _screen.resize(_height); + + + for (ScreenIterator iter = _screen.begin(); iter != _screen.end(); ++iter) + { + iter->resize(_width); + } + + +} + + +void Screen::beginUpdate() +{ + _updates.clear(); +} + +iRect Screen::endUpdate() +{ + int maxX = -1; + int maxY = -1; + int minX = _width; + int minY = _height; + + for (UpdateIterator iter = _updates.begin(); iter != _updates.end(); ++iter) + { + maxX = std::max(maxX, iter->x); + maxY = std::max(maxY, iter->y); + + minX = std::min(minX, iter->x); + minY = std::min(minY, iter->y); + } + + return iRect(iPoint(minX, minY), iSize(maxX + 1 - minX, maxY + 1 - minY)); +} + +void Screen::setFlag(uint8_t flag) +{ + _flag = flag; +} + + +void Screen::putc(uint8_t c, bool incrementX) +{ + if (_cursor.x < _width) + { + _updates.push_back(_cursor); + + _screen[_cursor.y][_cursor.x] = CharInfo(c, _flag); + + if (incrementX && _cursor.x < _width - 1) ++_cursor.x; + } +} + +void Screen::setX(int x, bool clamp) +{ + if (x < 0) + { + if (clamp) _cursor.x = 0; + return; + } + if (x >= _width) + { + if (clamp) _cursor.x = _width - 1; + return; + } + + _cursor.x = x; +} + + +void Screen::setY(int y, bool clamp) +{ + if (y < 0) + { + if (clamp) _cursor.y = 0; + return; + } + if (y >= _height) + { + if (clamp) _cursor.y = _height - 1; + return; + } + + _cursor.y = y; +} + + + +int Screen::incrementX(bool clamp) +{ + setX(_cursor.x + 1, clamp); + return _cursor.x; +} + +int Screen::decrementX(bool clamp) +{ + setX(_cursor.x - 1, clamp); + return _cursor.x; +} + +int Screen::incrementY(bool clamp) +{ + setY(_cursor.y + 1, clamp); + return _cursor.y; +} + +int Screen::decrementY(bool clamp) +{ + setY(_cursor.y - 1, clamp); + return _cursor.y; +} + + +void Screen::eraseLine() +{ + // erases everything to the right of, and including, the cursor + + for (CharInfoIterator ciIter = _screen[_cursor.y].begin() + _cursor.x; ciIter < _screen[_cursor.y].end(); ++ciIter) + { + *ciIter = CharInfo(0, _flag); + } + + _updates.push_back(_cursor); + _updates.push_back(iPoint(_width - 1, _cursor.y)); +} +void Screen::eraseScreen() +{ + // returns everything to the right of, and including, the cursor as well as all subsequent lines. + + eraseLine(); + + if (_cursor.y == _height -1) return; + + for (ScreenIterator iter = _screen.begin() + _cursor.y; iter < _screen.end(); ++iter) + { + for (CharInfoIterator ciIter = iter->begin(); ciIter < iter->end(); ++ciIter) + { + *ciIter = CharInfo(0, _flag); + } + + } + + _updates.push_back(iPoint(0, _cursor.y + 1)); + _updates.push_back(iPoint(_width - 1, _height - 1)); +} + + +void Screen::lineFeed() +{ + // moves the screen up one row, inserting a blank line at the bottom. + + if (_cursor.y == _height - 1) + { + + // move lines 1..end up 1 line. + for (ScreenIterator iter = _screen.begin() + 1; iter < _screen.end(); ++iter) + { + iter[-1] = *iter; + } + + // reset the bottom line + //_screen.back().clear(); + //_screen.back().resize(_width); + + for (CharInfoIterator ciIter = _screen.back().begin(); ciIter < _screen.back().end(); ++ciIter) + { + *ciIter = CharInfo(0, 0); + } + + _updates.push_back(iPoint(0, 0)); + _updates.push_back(iPoint(_width - 1, _height - 1)); + } + else + { + _cursor.y++; + } +} + +void Screen::reverseLineFeed() +{ + // moves the cursor down one row, inserting a blank line at the top. + + if (_cursor.y == 0) + { + + for (ReverseScreenIterator iter = _screen.rbegin() + 1; iter < _screen.rend(); ++iter) + { + iter[-1] = *iter; + } + + // reset the top line + //_screen.front().clear(); + //_screen.front().resize(_width); + + for (CharInfoIterator ciIter = _screen.front().begin(); ciIter < _screen.front().end(); ++ciIter) + { + *ciIter = CharInfo(0, 0); + } + + _updates.push_back(iPoint(0, 0)); + _updates.push_back(iPoint(_width - 1, _height - 1)); + } + else + { + _cursor.y--; + } + +} \ No newline at end of file diff --git a/Screen.h b/Screen.h new file mode 100644 index 0000000..8ed43b1 --- /dev/null +++ b/Screen.h @@ -0,0 +1,133 @@ +/* + * Screen.h + * 2Term + * + * Created by Kelvin Sherlock on 7/7/2010. + * Copyright 2010 __MyCompanyName__. All rights reserved. + * + */ + +#ifndef __SCREEN_H__ +#define __SCREEN_H__ + +#include "iGeometry.h" + +#include + +typedef struct CharInfo { + + CharInfo() : c(0), flag(0) {} + CharInfo(uint8_t cc, uint8_t ff) : c(cc), flag(ff) {} + + uint8_t c; + uint8_t flag; + +} CharInfo; + +class Screen { + +public: + + Screen(unsigned height, unsigned width); + + int x() const; + int y() const; + + iPoint cursor() const; + uint8_t flag() const; + + unsigned height() const; + unsigned width() const; + + + int incrementX(bool clamp = true); + int decrementX(bool clamp = true); + int incrementY(bool clamp = true); + int decrementY(bool clamp = true); + + void setX(int x, bool clamp = true); + void setY(int y, bool clamp = true); + + void setCursor(iPoint point, bool clampX = true, bool clampY = true); + void setCursor(int x, int y, bool clampX = true, bool clampY = true); + + void setFlag(uint8_t flag); + + void putc(uint8_t c, bool incrementX = true); + + void eraseLine(); + void eraseScreen(); + + void lineFeed(); + void reverseLineFeed(); + + + void beginUpdate(); + iRect endUpdate(); + +private: + + iPoint _cursor; + unsigned _height; + unsigned _width; + + uint8_t _flag; + + std::vector< std::vector< CharInfo > > _screen; + + std::vector _updates; + + + typedef std::vector< std::vector< CharInfo > >::iterator ScreenIterator; + typedef std::vector< std::vector< CharInfo > >::reverse_iterator ReverseScreenIterator; + + typedef std::vector::iterator CharInfoIterator; + typedef std::vector::iterator UpdateIterator; + +}; + + +int Screen::x() const +{ + return _cursor.x; +} + +int Screen::y() const +{ + return _cursor.y; +} + +iPoint Screen::cursor() const +{ + return _cursor; +} + +uint8_t Screen::flag() const +{ + return _flag; +} + +unsigned Screen::height() const +{ + return _height; +} + +unsigned Screen::width() const +{ + return _width; +} + +void Screen::setCursor(iPoint point, bool clampX, bool clampY) +{ + setX(point.x, clampX); + setY(point.y, clampY); +} + +void Screen::setCursor(int x, int y, bool clampX, bool clampY) +{ + setX(x, clampX); + setY(y, clampY); +} + + +#endif diff --git a/TermWindowController.h b/TermWindowController.h new file mode 100644 index 0000000..1e076c0 --- /dev/null +++ b/TermWindowController.h @@ -0,0 +1,24 @@ +// +// TermWindowController.h +// 2Term +// +// Created by Kelvin Sherlock on 7/2/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#import + + +@class EmulatorView; + +@interface TermWindowController : NSWindowController { + + IBOutlet EmulatorView *_emulatorView; + + int _child; + +} + +-(void)initPTY; + +@end diff --git a/TermWindowController.m b/TermWindowController.m new file mode 100644 index 0000000..937dde4 --- /dev/null +++ b/TermWindowController.m @@ -0,0 +1,98 @@ +// +// TermWindowController.m +// 2Term +// +// Created by Kelvin Sherlock on 7/2/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#import "TermWindowController.h" +#import "EmulatorView.h" + +#define TTYDEFCHARS + +#include +#include +#include +#include +#include +#include + +@implementation TermWindowController + ++(id)new +{ + return [[self alloc] initWithWindowNibName: @"TermWindow"]; +} + +-(void)awakeFromNib +{ + [self initPTY]; +} + +-(void)initPTY +{ + int pid; + int fd; + struct termios term; + struct winsize ws = { 24, 80, 0, 0 }; + //int flags; + + memset(&term, 0, sizeof(term)); + + //term.c_oflag = OPOST | ONLCR; + //term.c_lflag = ECHO; + //term.c_iflag = ICRNL; // | ICANON | ECHOE | ISIG; + + term.c_oflag = TTYDEF_OFLAG; + term.c_lflag = TTYDEF_LFLAG; + term.c_iflag = TTYDEF_IFLAG; + term.c_cflag = TTYDEF_CFLAG; + + term.c_ispeed = term.c_ospeed = TTYDEF_SPEED; + + memcpy(term.c_cc, ttydefchars, sizeof(ttydefchars)); + + + + pid = forkpty(&fd, NULL, &term, &ws); + + if (pid < 0) + { + //error + return; + } + if (pid == 0) + { + const char *environ[] = { + "TERM=vt52", + "LANG=C", + "TERM_PROGRAM=2Term", + NULL + }; + // call login -f [username] + // export TERM=... + + + + execle("/usr/bin/login", "login", "-f", "kelvin", NULL, environ); + fprintf(stderr, "execle failed\n"); + fflush(stderr); + + exit(-1); + // child + } + + /* + if (fcntl(fd, F_GETFL, &flags) < 0) flags = 0; + fcntl(fd, F_SETFL, flags | O_NONBLOCK); + */ + + _child = pid; + + [_emulatorView setFd: fd]; + [_emulatorView startBackgroundReader]; +} + + +@end diff --git a/TwoTerm-Info.plist b/TwoTerm-Info.plist new file mode 100644 index 0000000..f696cb2 --- /dev/null +++ b/TwoTerm-Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/TwoTermAppDelegate.h b/TwoTermAppDelegate.h new file mode 100644 index 0000000..afbd21b --- /dev/null +++ b/TwoTermAppDelegate.h @@ -0,0 +1,18 @@ +// +// TwoTermAppDelegate.h +// 2Term +// +// Created by Kelvin Sherlock on 6/29/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#import + +@interface TwoTermAppDelegate : NSObject { + NSWindow *window; + NSImageView *imageView; +} + +@property (assign) IBOutlet NSWindow *window; +@property (assign) IBOutlet NSImageView *imageView; +@end diff --git a/TwoTermAppDelegate.m b/TwoTermAppDelegate.m new file mode 100644 index 0000000..a09a802 --- /dev/null +++ b/TwoTermAppDelegate.m @@ -0,0 +1,38 @@ +// +// TwoTermAppDelegate.m +// 2Term +// +// Created by Kelvin Sherlock on 6/29/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#import "TwoTermAppDelegate.h" + +#include "chars.h" +#import "TermWindowController.h" + + +@implementation TwoTermAppDelegate + +@synthesize window; +@synthesize imageView; + + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Insert code here to initialize your application + /* + NSImage *image; + CGImageRef imgRef = ImageForCharacter('A'); + + image = [[NSImage alloc] initWithCGImage: imgRef size: CGSizeZero]; + + [imageView setImage: image]; + [image release]; + CGImageRelease(imgRef); + */ + + NSWindowController * win = [TermWindowController new]; + [win showWindow: nil]; +} + +@end diff --git a/VT05.h b/VT05.h new file mode 100644 index 0000000..2208e84 --- /dev/null +++ b/VT05.h @@ -0,0 +1,27 @@ +// +// VT05.h +// 2Term +// +// Created by Kelvin Sherlock on 7/6/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#import +#import "Emulator.h" + +#include "iGeometry.h" + +class OutputChannel; +class Screen; + + + +@interface VT05 : NSObject { + unsigned _state; + struct iPoint _dca; + BOOL _upperCase; +} + +-(void)tab: (Screen *)screen; + +@end diff --git a/VT05.mm b/VT05.mm new file mode 100644 index 0000000..4c37346 --- /dev/null +++ b/VT05.mm @@ -0,0 +1,231 @@ +// +// VT05.m +// 2Term +// +// Created by Kelvin Sherlock on 7/6/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#include +#include + +#import "VT05.h" + +#include "OutputChannel.h" +#include "Screen.h" + + +@implementation VT05 + +enum { + StateText, + StateDCAY, + StateDCAX +}; + +enum { + VTBell = 07, + VTCursorLeft = 010, + VTTab = 011, + VTLineFeed = 012, + VTCursorDown = 013, + VTCarriageReturn = 015, + VTCAD = 016, + + VTCursorRight = 030, + VTCursorUp = 032, + VTHome = 035, + VTEOL = 036, + VTEOS = 037 + +}; + +-(void)reset +{ + _state = StateText; +} + +-(void)keyDown: (NSEvent *)event screen: (Screen *)screen output: (OutputChannel *)output +{ + unsigned flags = [event modifierFlags]; + NSString *chars = [event charactersIgnoringModifiers]; + unsigned length = [chars length]; + + + for (unsigned i = 0; i < length; ++i) + { + unichar uc = [chars characterAtIndex: i]; + uint8_t c; + + switch (uc) + { + case NSLeftArrowFunctionKey: + output->write(VTCursorLeft); + break; + case NSRightArrowFunctionKey: + output->write(VTCursorRight); + break; + case NSUpArrowFunctionKey: + output->write(VTCursorUp); + break; + case NSDownArrowFunctionKey: + output->write(VTCursorDown); + break; + case NSHomeFunctionKey: + output->write(VTHome); + break; + case NSDeleteCharacter: + output->write(0x7f); + break; + + default: + if (uc > 0x7f) break; + c = uc; + + if (flags & NSControlKeyMask) + { + c = CTRL(c); + } + output->write(c); + break; + } + } +} + + +-(void)processCharacter: (uint8_t)c screen: (Screen *)screen output: (OutputChannel *)output +{ + + switch (_state) + { + case StateText: + { + switch (c) + { + case 0x00: + case 0x7f: + // padding. + break; + case VTBell: + /* + * Produces an audible tone. + */ + NSBeep(); + break; + + case VTCursorLeft: + // backspace aka left arrow. + screen->decrementX(); + break; + + case VTTab: + [self tab: screen]; + break; + + case VTLineFeed: + // line feed. + screen->lineFeed(); + break; + + case VTCursorDown: + // arrow down. + screen->incrementY(); + break; + + case VTCarriageReturn: + // carriage return; + screen->setX(0); + break; + + case VTCAD: + // CAD + _state = StateDCAY; + break; + + case VTCursorRight: + // right arrow. + screen->incrementX(); + break; + + case VTCursorUp: + // up arrow + screen->decrementY(); + break; + + case VTHome: + // home + screen->setCursor(0, 0); + break; + + case VTEOL: + // erase line + screen->eraseLine(); + break; + + case VTEOS: + // erase screen, + screen->eraseScreen(); + break; + + default: + if (c >= ' ' && c < 0x7f) + { + // if cursor at end of screen, overwrite previous contents, doesn't advance cursor. + + if (_upperCase) c = toupper(c); + screen->putc(c); + } + break; + } + + break; + } + case StateDCAY: + { + // not sure how invalid values are handled. + + if (c != 0x00) + { + _state = StateDCAX; + _dca.y = c - ' '; + } + break; + } + case StateDCAX: + { + if (c != 0x00) + { + _state = StateText; + _dca.x = c - ' '; + + screen->setCursor(_dca); + } + break; + } + } + +} + +-(void)tab: (Screen *)screen +{ + /* + * TAB (011_8) causes the cursor to move right to the next TAB stop each time the TAB code is received. + * TAB stops are preset eight character spaces apart. TAB stop locations are at characters positions 1, 9, + * 17, 25, 33, 41, 49, 57, and 65. Once the cursor reaches character position 65, all TAB commands + * received thereafter will cause the cursor to move only one character position. Once the cursor reaches + * character position 72, receipt of the the TAB code has no effect. + */ + + int x = screen->x(); + + if (x >= screen->width() - 8) + { + screen->setX(x + 1); + } + else + { + screen->setX((x + 8) & ~7); + } +} + +@end diff --git a/VT52.h b/VT52.h new file mode 100644 index 0000000..0976fa2 --- /dev/null +++ b/VT52.h @@ -0,0 +1,27 @@ +// +// VT52.h +// 2Term +// +// Created by Kelvin Sherlock on 7/7/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#import +#import "Emulator.h" + +#include "iGeometry.h" + + +@interface VT52 : NSObject { + + unsigned _model; + + unsigned _state; + iPoint _dca; + BOOL _altKeyPad; + BOOL _graphics; +} + +-(void)tab: (Screen *)screen; + +@end diff --git a/VT52.mm b/VT52.mm new file mode 100644 index 0000000..a5ae990 --- /dev/null +++ b/VT52.mm @@ -0,0 +1,454 @@ +// +// VT52.mm +// 2Term +// +// Created by Kelvin Sherlock on 7/7/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#include +#include + +#import "VT52.h" +#include "OutputChannel.h" +#include "Screen.h" + +enum { + StateText, + StateEsc, + StateDCAY, + StateDCAX +}; + + +// VT52 is 24 x 80 upper/lowercase. +// 50/50H is 12 * 80, uppercase only. H has a keypad. +// The 50s only display/transmit uppercase characters and lack `~ {} characters on the keypad. +// VT55 is a VT52 with extra graphic display capabilites. +enum { + ModelVT52, + ModelVT50H, + ModelVT50, + ModelVT55 +}; + +#define ESC "\x1b" + +@implementation VT52 + +-(void)keyDown: (NSEvent *)event screen: (Screen *)screen output: (OutputChannel *)output +{ + unsigned flags = [event modifierFlags]; + NSString *chars = [event charactersIgnoringModifiers]; + unsigned length = [chars length]; + + + for (unsigned i = 0; i < length; ++i) + { + unichar uc = [chars characterAtIndex: i]; + uint8_t c; + + + if (flags & NSNumericPadKeyMask) + { + if (_altKeyPad) + { + const char *str = NULL; + switch (uc) + { + case '0': + str = ESC "?p"; + break; + case '1': + str = ESC "?q"; + break; + case '2': + str = ESC "?r"; + break; + case '3': + str = ESC "?s"; + break; + case '4': + str = ESC "?t"; + break; + case '5': + str = ESC "?u"; + break; + case '6': + str = ESC "?v"; + break; + case '7': + str = ESC "?w"; + break; + case '8': + str = ESC "?x"; + break; + case '9': + str = ESC "?y"; + break; + case '.': + str = ESC "?n"; + break; + case NSNewlineCharacter: //? + case NSEnterCharacter: + str = ESC "?M"; + break; + + } + if (str) + { + output->write(str); + break; + } + } + } + + + switch (uc) + { + case NSEnterCharacter: + output->write('\r'); + break; + case NSDeleteCharacter: + output->write(0x7f); + break; + case NSUpArrowFunctionKey: + output->write(ESC "A"); + break; + case NSDownArrowFunctionKey: + output->write(ESC "B"); + break; + case NSRightArrowFunctionKey: + output->write(ESC "C"); + break; + case NSLeftArrowFunctionKey: + output->write(ESC "D"); + break; + + default: + if (uc > 0x7f) break; + c = uc; + + if (flags & NSControlKeyMask) + { + c = CTRL(c); + } + output->write(c); + break; + } + } +} + +-(void)reset +{ + _state = StateText; +} + +-(void)processCharacter: (uint8_t)c screen: (Screen *)screen output: (OutputChannel *)output +{ + + switch (_state) + { + case StateEsc: + { + switch (c) + { + case 0x00: + case 0x7f: + // filler. + break; + + case 0x1b: + /* + * If the VT50 or VT50H receives ESC ESC from the host, the second ESC will cancel the Escape Sequence ... + * If the VT52 receies ESC ESC, it will still be prepared to interpret rather than display the next displayable character. + */ + switch (_model) { + + case ModelVT50: + case ModelVT50H: + _state = StateText; + break; + } + break; + + // cursor control. + + case 'A': + /* cursor up */ + screen->decrementY(); + _state = StateText; + break; + case 'C': + /* cursor right */ + screen->incrementX(); + _state = StateText; + break; + + case 'B': + /* cursor down (not on VT50) */ + + if (_model != ModelVT50) + screen->incrementY(); + _state = StateText; + break; + + case 'D': + /* cursor left (not on the VT50) */ + + if (_model != ModelVT50) + screen->decrementX(); + _state = StateText; + break; + + case 'H': + /* home */ + screen->setCursor(0, 0); + _state = StateText; + + case 'Y': + /* direct cursor addressing (not on the VT50) */ + if (_model == ModelVT50) + { + _state = StateText; + } + else + { + _state = StateDCAY; + } + break; + + + case 'I': + // reverse line feed + switch (_model) { + case ModelVT52: + case ModelVT55: + screen->reverseLineFeed(); + break; + } + _state = StateText; + break; + + + // erasing + case 'K': + // erase to end of line + screen->eraseLine(); + _state = StateText; + break; + + case 'J': + // erase to end of screen. + screen->eraseScreen(); + _state = StateText; + break; + + + // alternate keypad mode + case '=': + switch (_model) { + case ModelVT52: + case ModelVT55: + _altKeyPad = YES; + break; + } + _state = StateText; + break; + + + case '>': + switch (_model) { + case ModelVT52: + case ModelVT55: + _altKeyPad = NO; + break; + } + _state = StateText; + break; + + + // graphics. + case 'F': + switch (_model) { + case ModelVT52: + case ModelVT55: + _graphics = YES; + break; + } + _state = StateText; + break; + + case 'G': + switch (_model) { + case ModelVT52: + case ModelVT55: + _graphics = NO; + break; + } + _state = StateText; + break; + + + case 'Z': + // identify terminal. + // NB -- these indicate no copier. + switch(_model) { + case ModelVT50: + output->write(ESC "/A"); + break; + case ModelVT50H: + output->write(ESC "/H"); + break; + case ModelVT52: + output->write(ESC "/K"); + break; + + case ModelVT55: + output->write(ESC "/C"); // E? + break; + + } + break; + + // hold screen unsupported. + + // ESC 1 -- (VT55) -- enter graph drawing + // ESC 2 -- (VT55) -- exit graph drawing + + default: + std::fprintf(stderr, "Unrecognized escape sequence: %02x (%c)\n", (int)c, c); + _state = StateText; + break; + } + + + break; + } + + case StateDCAY: + { + if (c == 0x00) break; + _dca.y = c - 0x20; + _state = StateDCAX; + break; + } + + case StateDCAX: + { + if (c == 0x00) break; + + _dca.x = c - 0x20; + + /* + * If the line # does not specify a line that exists on the screen, the VT50H + * will move the cursor to the bottom line of the screen. However, the VT52 will + * not move the cursor vertically if the vertical parameter is out of bounds. + */ + + /* + * If the column number is greater than 157 and, therefore, does not specify a column + * that exists on the screen, the cursor is moved to the rightmost column on a line on all models. + */ + + screen->setCursor(_dca, true, _model == ModelVT50H); + + _state = StateText; + break; + } + + case StateText: + { + + switch(c) + { + case 0x00: + case 0x7f: + // filler + break; + case 0x1b: + _state = StateEsc; + break; + + case 0x07: + NSBeep(); + break; + + case 0x08: + // backspace + screen->decrementX(); + break; + + case 0x09: + [self tab: screen]; + + case 0x0a: + screen->lineFeed(); + break; + + case 0x0d: + screen->setX(0); + break; + + case 0x0e: + // VT52H only -- backwards compatability with the VT05. + if (_model == ModelVT50H) + _state = StateDCAY; + break; + + default: + if (c >= 0x20 && c < 0x7f) + { + // VT50x cannot display anything in the range 0140--0176 + + if (c >= 0140 && (_model == ModelVT50 || _model == ModelVT50H)) + c -= 040; + + output->write(c); + } + } + + break; + } + + + + + + + + + } + + + + + + +} + + +-(void)tab: (Screen *)screen +{ + /* + * TAB (011_8) causes the cursor to move right to the next TAB stop each time the TAB code is received. + * TAB stops are preset eight character spaces apart. TAB stop locations are at characters positions 1, 9, + * 17, 25, 33, 41, 49, 57, and 65. Once the cursor reaches character position 65, all TAB commands + * received thereafter will cause the cursor to move only one character position. Once the cursor reaches + * character position 72, receipt of the the TAB code has no effect. + */ + + int x = screen->x(); + + if (x >= screen->width() - 8) + { + screen->setX(x + 1); + } + else + { + screen->setX((x + 8) & ~7); + } +} + + +@end diff --git a/VT52View.h b/VT52View.h new file mode 100644 index 0000000..e6e462b --- /dev/null +++ b/VT52View.h @@ -0,0 +1,36 @@ +// +// VT52View.h +// 2Term +// +// Created by Kelvin Sherlock on 7/2/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#import + +#import "EmulatorView.h" + +#include +#include + +@interface VT52View : EmulatorView { + + BOOL _altKeyPad; + BOOL _vt50; + + // terminal emulator implemented as a state machine. + unsigned _state; + + // only used by child thread. + + std::vector _updates; + + char _yTemp[2]; +} + + + + +@end + + diff --git a/VT52View.mm b/VT52View.mm new file mode 100644 index 0000000..60cd4e9 --- /dev/null +++ b/VT52View.mm @@ -0,0 +1,676 @@ +// +// VT52View.mm +// 2Term +// +// Created by Kelvin Sherlock on 7/2/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#include +#include + +#import "VT52View.h" + +const char esc = 0x1b; +#define ESC "\x1b" + +enum { + StateText, + StateEscape, + StateEscapeY1, + StateEscapeY2 +}; + + +@interface VT52View (Cursor) + +-(void)cursorLeft; +-(void)cursorRight; +-(void)cursorUp; +-(void)cursorDown; +-(void)cursorHome; + +-(void)_setCursor: (CursorPosition)cursor; + +-(void)lineFeed; +-(void)reverseLineFeed; +-(void)carriageReturn; + +-(void)tab; + +@end + +@interface VT52View (Private) + + +-(void)invalidate; + + +-(void)processCharacter: (uint8_t)c; + +-(void)appendChar: (uint8_t)c; + +-(void)eraseLine; +-(void)eraseScreen; + +@end + + + +@implementation VT52View + + + + + +-(void)dataAvailable +{ + //NB -- this is not the main thread. + + + // actually read the data + for(;;) + { + ssize_t i; + uint8_t buffer[512]; + ssize_t size = read(_fd, buffer, sizeof(buffer)); + NSAutoreleasePool *pool; + + if (size == 0) break; + if (size < 0) + { + if (errno == EAGAIN) break; + + perror("[VT52View dataAvailable] : read: "); + break; + } + + [_lock lock]; + + pool = [NSAutoreleasePool new]; + for (i = 0 ; i < size; ++i) + { + //if (buffer[i] < ' ') std::fprintf(stderr, "%02x\n", (int)buffer[i]); + [self processCharacter: buffer[i]]; + } + [self invalidate]; + + [_lock unlock]; + [pool release]; + } + +} + + +-(void)keyDown: (NSEvent *)theEvent +{ + unsigned flags = [theEvent modifierFlags]; + NSString *chars = [theEvent charactersIgnoringModifiers]; + + unsigned length = [chars length]; + unsigned i; + + if (flags & NSCommandKeyMask) return; + + // length should always be 1... + for (i = 0 ; i < length; ++i) + { + unichar uc = [chars characterAtIndex: i]; + char c; + + + if (flags & NSNumericPadKeyMask) + { + const char *str = NULL; + if (_altKeyPad) + { + switch (uc) + { + case '0': + str = ESC "?p"; + break; + case '1': + str = ESC "?q"; + break; + case '2': + str = ESC "?r"; + break; + case '3': + str = ESC "?s"; + break; + case '4': + str = ESC "?t"; + break; + case '5': + str = ESC "?u"; + break; + case '6': + str = ESC "?v"; + break; + case '7': + str = ESC "?w"; + break; + case '8': + str = ESC "?x"; + break; + case '9': + str = ESC "?y"; + break; + case '.': + str = ESC "?n"; + break; + case NSNewlineCharacter: + case NSEnterCharacter: + str = ESC "?M"; + break; + + } + } + + switch (uc) + { + case NSEnterCharacter: + uc = '\r'; + break; + case NSUpArrowFunctionKey: + str = ESC "A"; + break; + case NSDownArrowFunctionKey: + str = ESC "B"; + break; + case NSRightArrowFunctionKey: + str = ESC "C"; + break; + case NSLeftArrowFunctionKey: + str = ESC "D"; + break; + } + if (str) + { + ssize_t size = write(_fd, str, strlen(str)); + if (size < 0) + { + perror("keyDown: write"); + } + continue; + } + + } + + if (uc > 0x7f) continue; + c = uc; + + if (flags & NSControlKeyMask) + { + // 040, 0100, and 0140 are all equivalent + c &= 0x1f; + } + /* + else + { + if (c == NSEnterCharacter) c = '\r'; + } + */ + + + write(_fd, &c, 1); + } +} + + + + +@end + + + + +@implementation VT52View (Cursor) + +// these are not thread safe... + +#pragma mark - +#pragma mark Cursor Control +-(void)setCursor: (CursorPosition)cursor +{ + [_lock lock]; + [self _setCursor: cursor]; + //[self invalidate]; + [_lock unlock]; +} + +-(void)_setCursor: (CursorPosition)cursor +{ + + if (cursor.x < 0) cursor.x = 0; + if (cursor.x >= _width) cursor.x = _width - 1; + + if (cursor.y < 0) cursor.y = 0; + if (cursor.y >= _height) cursor.y = _height - 1; + + if (cursor == _cursor) return; + + // TODO -- cursor should be a child view, to handle blinking, cursor style, etc. + //_updates.push_back(_cursor); + //_updates.push_back(cursor); + _cursor = cursor; +} + +-(void)cursorLeft +{ + if (_cursor.x == 0) return; + + [self _setCursor: CursorPosition(_cursor.x - 1, _cursor.y)]; +} + +-(void)cursorRight +{ + if (_cursor.x == (_width - 1)) return; + + [self _setCursor: CursorPosition(_cursor.x + 1, _cursor.y)]; +} + +-(void)cursorUp +{ + if (_cursor.y == 0) return; + + [self _setCursor: CursorPosition(_cursor.x, _cursor.y - 1)]; +} + +-(void)cursorDown +{ + if (_cursor.y == (_height - 1)) return; + + [self _setCursor: CursorPosition(_cursor.x, _cursor.y + 1)]; +} + +-(void)lineFeed +{ + // increment line, column doesn't change. If already on the bottom line, a 1-line scroll occurs. + + if (_cursor.y == _height - 1) + { + CharInfo tmp = {0,0}; + // scroll all the lines.... + for (unsigned y = 1; y < _height; ++y) + { + for (unsigned x = 0; x < _width; ++x) + { + _screen[y-1][x] = _screen[y][x]; + } + } + + for (unsigned x = 0; x < _width; ++x) + { + _screen[_height -1][x] = tmp; + } + + + [self setNeedsDisplay: YES]; + } + else + { + [self _setCursor: CursorPosition(_cursor.x, _cursor.y + 1)]; + } +} + +-(void)reverseLineFeed +{ + // decrement line, column doesn't change. If already on the bottom line, a 1-line scroll occurs. + + if (_cursor.y == 0) + { + CharInfo tmp = {0,0}; + // scroll all the lines.... + for (unsigned y = 0; y < _height - 1; ++y) + { + for (unsigned x = 0; x < _width; ++x) + { + _screen[y+1][x] = _screen[y][x]; + } + } + + for (unsigned x = 0; x < _width; ++x) + { + _screen[0][x] = tmp; + } + + + [self setNeedsDisplay: YES]; + } + else + { + [self _setCursor: CursorPosition(_cursor.x, _cursor.y - 1)]; + } +} + + +-(void)carriageReturn +{ + // move x to 0. + if (_cursor.x == 0) return; + [self _setCursor: CursorPosition(0, _cursor.y)]; +} + +-(void)cursorHome +{ + [self _setCursor: CursorPosition(0,0)]; +} + +-(void)tab +{ + // TODO -- does this insert spaces? + + // move right 1 (or more) positions. + // stops (1-based): 9, 17, 25, 33, 41, 49, 57, 65, 73, + // if x >= 73, move right 1. If x == _width + + int x = _cursor.x; + + if (x == _width -1) return; + + //x += 1; + // doesn't handle end case... + x = (x + 8) & ~0x07; + + [self _setCursor: CursorPosition(x, _cursor.y)]; +} + +@end + + + +@implementation VT52View (Private) + + +-(void)invalidate +{ + // caller must lock prior to calling. + // resets the _updates list. + + std::vector::iterator iter; + + int minX = _width - 1; + int maxX = 0; + int minY = _height - 1; + int maxY = 0; + + if (_updates.empty()) return; + + + for (iter = _updates.begin(); iter != _updates.end(); ++iter) + { + minX = std::min(minX, iter->x); + maxX = std::max(maxX, iter->x); + minY = std::min(minY, iter->y); + maxY = std::max(maxY, iter->y); + } + + // TODO -- character height/width sizes. + + + + [self setNeedsDisplayInRect: NSMakeRect(minX * _charWidth, minY * _charHeight, (maxX - minX + 1) * _charWidth, (maxY - minY + 1) * _charHeight)]; + + + _updates.clear(); + +} + + + +// state machine. +-(void)processCharacter: (uint8_t)c +{ + + switch (_state) + { + case StateText: + { + switch (c) + { + case 0x00: + case 0x7f: + // padding; + break; + + case 0x1b: + _state = StateEscape; + break; + + case 0x07: + // bell... + NSBeep(); + break; + + case 0x08: + [self cursorLeft]; + // backspace + break; + + case 0x09: + // tab + [self tab]; + break; + + case 0x0a: + case 0x0b: + case 0x0c: + // lf + [self lineFeed]; + break; + + case 0x0d: + // cr + [self carriageReturn]; + break; + + case 0x0e: + case 0x0f: + // g0/g1 char set + break; + + default: + if (c >= 0x20 && c <= 0x7f) + [self appendChar: c]; + break; + + } + break; + } + + case StateEscape: + { + switch (c) + { + case 0x00: + case 0x7f: + break; + case 0x1b: + // on vt52 is ignored, on vt50 cancels escape sequence. + if (_vt50) _state = StateText; + break; + + + case 'A': + _state = StateText; + [self cursorUp]; + break; + case 'B': + _state = StateText; + [self cursorDown]; + break; + case 'C': + _state = StateText; + [self cursorRight]; + break; + case 'D': + _state = StateText; + [self cursorLeft]; + break; + + case 'I': + _state = StateText; + if (!_vt50) + [self reverseLineFeed]; + break; + + case 'H': + _state = StateText; + [self _setCursor: CursorPosition(0,0)]; + break; + + case 'J': + _state = StateText; + [self eraseScreen]; + break; + + case 'K': + _state = StateText; + [self eraseLine]; + break; + + case 'Y': + _state = StateEscapeY1; + break; + + + case '=': + _state = StateText; + _altKeyPad = YES; + break; + + case '>': + _state = StateText; + _altKeyPad = NO; + break; + + case 'Z': + //identity + _state = StateText; + + write(_fd, _vt50 ? ESC "/A" : ESC "/K", 3); + break; + + case '1': + case '2': + // alt graphic modes (unsupported) + _state = StateText; + break; + + case 'F': + case 'G': + _state = StateText; + // graphic/ascii char set (unsupported) + break; + + /* + case '<': + //ANSI mode (vt100) + _state = StateText; + break; + */ + + + default: + _state = StateText; + std::fprintf(stderr, "Unrecognized escape character: %c\n", c); + break; + } + + + break; + } + + /* + * ESC Y line# column# + * line# 040--067 + * + * vt50H moved to bottom line if out of bounds. + * vt52 does not adjust if out of bounds. + * + * column# 040--0157 + * if out of bounds, moves to the rightmost column. + */ + + case StateEscapeY1: + { + _state = StateEscapeY2; + if (c >= 0x20) c -= 0x20; + else c = -1; + + _yTemp[0] = c; + break; + } + case StateEscapeY2: + { + CursorPosition cp = _cursor; + + _state = StateText; + + if (c >= 0x20) c -= 0x20; + else c = -1; + + _yTemp[1] = c; + + // vt52 style. + if (_yTemp[0] < _height) cp.y = _yTemp[0]; + if (_yTemp[1] < _width) cp.x = _yTemp[1]; + + [self _setCursor: cp]; + + break; + } + } +} + +-(void)appendChar: (uint8_t)c +{ + CharInfo ci = { c, 0 }; + int x = _cursor.x; + int y = _cursor.y; + + if (y == _width) return; // eol. + + _screen[y][x] = ci; + + _updates.push_back(_cursor); + + [self _setCursor: CursorPosition(x + 1, y)]; +} + +-(void)eraseLine +{ + + CharInfo clear = {0, 0}; + + for (unsigned x = _cursor.x; x < _width; ++x) + { + _screen[_cursor.y][x] = clear; + } + // everything in between will be redrawn... + _updates.push_back(_cursor); + _updates.push_back(CursorPosition(_width - 1, _cursor.y)); +} + +-(void)eraseScreen +{ + CharInfo clear = {0, 0}; + + // erase line and all lines below. + [self eraseLine]; + + for (unsigned y = _cursor.y + 1; y < _height; ++y) + { + for (unsigned x = 0; x < _width; ++x) + { + _screen[y][x] = clear; + } + } + + _updates.push_back(CursorPosition(0, _cursor.y + 1)); + _updates.push_back(CursorPosition(_width - 1, _height - 1)); + +} + +@end \ No newline at end of file diff --git a/iGeometry.h b/iGeometry.h new file mode 100644 index 0000000..c4d9a62 --- /dev/null +++ b/iGeometry.h @@ -0,0 +1,54 @@ +/* + * iGeometry.h + * 2Term + * + * Created by Kelvin Sherlock on 7/7/2010. + * Copyright 2010 __MyCompanyName__. All rights reserved. + * + */ + +#ifndef __IGEOMETRY_H__ +#define __IGEOMETRY_H__ + + +typedef struct iPoint { + + int x; + int y; + +#ifdef __cplusplus + iPoint() : x(0), y(0) {} + iPoint(const iPoint &aPoint) : x(aPoint.x), y(aPoint.y) {} + iPoint(int xx, int yy) : x(xx), y(yy) {} +#endif + +} iPoint; + + +typedef struct iSize { + + int width; + int height; + +#ifdef __cplusplus + iSize() : width(0), height(0) {} + iSize(const iSize &aSize) : width(aSize.width), height(aSize.width) {} + iSize(int w, int h) : width(w), height(h) {} +#endif + +} iSize; + + +typedef struct iRect { + iPoint origin; + iSize size; + +#ifdef __cplusplus + iRect() {} + iRect(const iRect &aRect) : origin(aRect.origin), size(aRect.size) {} + iRect(const iPoint &aPoint, const iSize &aSize) : origin(aPoint), size(aSize) {} +#endif + +} iRect; + +#endif; \ No newline at end of file diff --git a/main.m b/main.m new file mode 100644 index 0000000..473720f --- /dev/null +++ b/main.m @@ -0,0 +1,14 @@ +// +// main.m +// 2Term +// +// Created by Kelvin Sherlock on 6/29/2010. +// Copyright 2010 __MyCompanyName__. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +}