diff --git a/2Term.xcodeproj/kelvin.pbxuser b/2Term.xcodeproj/kelvin.pbxuser index 3db2083..11f887f 100644 --- a/2Term.xcodeproj/kelvin.pbxuser +++ b/2Term.xcodeproj/kelvin.pbxuser @@ -55,11 +55,11 @@ B6E6A80A11EAB13000A24C0C /* EmulatorView.mm:468 */, B64925ED11EE73ED0065E73A /* VT52.mm:82 */, B649260011EE74E30065E73A /* VT52.mm:149 */, - B6358D0111F6846C00437AA2 /* VT100.mm:500 */, - B6358D0311F6846F00437AA2 /* VT100.mm:475 */, - B6358D0B11F6852300437AA2 /* VT100.mm:455 */, + B6358D0111F6846C00437AA2 /* VT100.mm:502 */, + B6358D0311F6846F00437AA2 /* VT100.mm:477 */, + B6358D0B11F6852300437AA2 /* VT100.mm:457 */, B6358D0E11F685B600437AA2 /* Screen.cpp:205 */, - B642D32A11FFA06800CBB349 /* VT100.mm:609 */, + B642D32A11FFA06800CBB349 /* VT100.mm:611 */, B642D33711FFA16F00CBB349 /* EmulatorView.mm:181 */, ); codeSenseManager = B676054911DADB9100D6B66C /* Code sense */; @@ -163,52 +163,47 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 301967171; - PBXWorkspaceStateSaveDate = 301967171; + PBXPerProjectTemplateStateSaveDate = 302402789; + PBXWorkspaceStateSaveDate = 302402789; }; perUserProjectItems = { - B60EBDFB11E916AE00C1974F = B60EBDFB11E916AE00C1974F /* PBXTextBookmark */; - B60EBDFC11E916AE00C1974F = B60EBDFC11E916AE00C1974F /* PBXTextBookmark */; - B60EBE6211E91C5900C1974F = B60EBE6211E91C5900C1974F /* PBXTextBookmark */; - B641C82311EA1B1600B6359F = B641C82311EA1B1600B6359F /* PBXTextBookmark */; - B641C88811EA8DCC00B6359F = B641C88811EA8DCC00B6359F /* PBXTextBookmark */; - B642D33111FFA14C00CBB349 = B642D33111FFA14C00CBB349 /* PBXTextBookmark */; - B642D33511FFA14C00CBB349 = B642D33511FFA14C00CBB349 /* PBXTextBookmark */; - B642D34011FFA2A100CBB349 = B642D34011FFA2A100CBB349 /* PBXTextBookmark */; - B64925C411EE622D0065E73A = B64925C411EE622D0065E73A /* PBXTextBookmark */; - B649E0B511E2A88D0061921F = B649E0B511E2A88D0061921F /* PBXTextBookmark */; - B65FA28111E29EDE00EB447E = B65FA28111E29EDE00EB447E /* PBXTextBookmark */; - B65FA2FE11E2A5D200EB447E = B65FA2FE11E2A5D200EB447E /* PBXTextBookmark */; - B669797711E6A6CE002ED475 = B669797711E6A6CE002ED475 /* PBXTextBookmark */; - B66979BD11E6ACB9002ED475 = B66979BD11E6ACB9002ED475 /* PBXTextBookmark */; - B6697A1B11E6C28A002ED475 = B6697A1B11E6C28A002ED475 /* PBXTextBookmark */; - B6697A5211E7E072002ED475 = B6697A5211E7E072002ED475 /* PBXTextBookmark */; - B6697A5311E7E072002ED475 = B6697A5311E7E072002ED475 /* PBXTextBookmark */; - B6697A5411E7E072002ED475 = B6697A5411E7E072002ED475 /* PBXTextBookmark */; - B6697A5511E7E072002ED475 = B6697A5511E7E072002ED475 /* PBXTextBookmark */; - B6697A5611E7E072002ED475 = B6697A5611E7E072002ED475 /* PBXTextBookmark */; - B6697A5811E7E072002ED475 = B6697A5811E7E072002ED475 /* PBXTextBookmark */; - B6697A5911E7E072002ED475 = B6697A5911E7E072002ED475 /* PBXTextBookmark */; - B6697A5A11E7E072002ED475 = B6697A5A11E7E072002ED475 /* PBXTextBookmark */; - B676058811DAE21100D6B66C = B676058811DAE21100D6B66C /* PBXTextBookmark */; - B676058911DAE21100D6B66C = B676058911DAE21100D6B66C /* PBXTextBookmark */; - B676058B11DAE21100D6B66C = B676058B11DAE21100D6B66C /* PlistBookmark */; - B676058C11DAE21100D6B66C = B676058C11DAE21100D6B66C /* PBXTextBookmark */; - B676060711DD4FA600D6B66C = B676060711DD4FA600D6B66C /* PBXTextBookmark */; - B676064811DEB80600D6B66C = B676064811DEB80600D6B66C /* PBXTextBookmark */; - B67606C811DED91C00D6B66C = B67606C811DED91C00D6B66C /* PBXTextBookmark */; - B699A0C211E58D3B00F54CC8 = B699A0C211E58D3B00F54CC8 /* PBXTextBookmark */; - B6A0F71A11F22CD200AC3547 = B6A0F71A11F22CD200AC3547 /* PBXTextBookmark */; - B6BED9D111F7B4C30064628F = B6BED9D111F7B4C30064628F /* PBXTextBookmark */; + B60EBDFB11E916AE00C1974F /* PBXTextBookmark */ = B60EBDFB11E916AE00C1974F /* PBXTextBookmark */; + B60EBDFC11E916AE00C1974F /* PBXTextBookmark */ = B60EBDFC11E916AE00C1974F /* PBXTextBookmark */; + B60EBE6211E91C5900C1974F /* PBXTextBookmark */ = B60EBE6211E91C5900C1974F /* PBXTextBookmark */; + B641C82311EA1B1600B6359F /* PBXTextBookmark */ = B641C82311EA1B1600B6359F /* PBXTextBookmark */; + B641C88811EA8DCC00B6359F /* PBXTextBookmark */ = B641C88811EA8DCC00B6359F /* PBXTextBookmark */; + B64925C411EE622D0065E73A /* PBXTextBookmark */ = B64925C411EE622D0065E73A /* PBXTextBookmark */; + B649E0B511E2A88D0061921F /* PBXTextBookmark */ = B649E0B511E2A88D0061921F /* PBXTextBookmark */; + B64F6BEB12064F0200EB2AFF /* PBXTextBookmark */ = B64F6BEB12064F0200EB2AFF /* PBXTextBookmark */; + B64F6BF6120650D900EB2AFF /* PBXTextBookmark */ = B64F6BF6120650D900EB2AFF /* PBXTextBookmark */; + B65FA28111E29EDE00EB447E /* PBXTextBookmark */ = B65FA28111E29EDE00EB447E /* PBXTextBookmark */; + B65FA2FE11E2A5D200EB447E /* PBXTextBookmark */ = B65FA2FE11E2A5D200EB447E /* PBXTextBookmark */; + B669797711E6A6CE002ED475 /* PBXTextBookmark */ = B669797711E6A6CE002ED475 /* PBXTextBookmark */; + B66979BD11E6ACB9002ED475 /* PBXTextBookmark */ = B66979BD11E6ACB9002ED475 /* PBXTextBookmark */; + B6697A1B11E6C28A002ED475 /* PBXTextBookmark */ = B6697A1B11E6C28A002ED475 /* PBXTextBookmark */; + B6697A5211E7E072002ED475 /* PBXTextBookmark */ = B6697A5211E7E072002ED475 /* PBXTextBookmark */; + B6697A5311E7E072002ED475 /* PBXTextBookmark */ = B6697A5311E7E072002ED475 /* PBXTextBookmark */; + B6697A5411E7E072002ED475 /* PBXTextBookmark */ = B6697A5411E7E072002ED475 /* PBXTextBookmark */; + B6697A5511E7E072002ED475 /* PBXTextBookmark */ = B6697A5511E7E072002ED475 /* PBXTextBookmark */; + B6697A5611E7E072002ED475 /* PBXTextBookmark */ = B6697A5611E7E072002ED475 /* PBXTextBookmark */; + B6697A5811E7E072002ED475 /* PBXTextBookmark */ = B6697A5811E7E072002ED475 /* PBXTextBookmark */; + B6697A5911E7E072002ED475 /* PBXTextBookmark */ = B6697A5911E7E072002ED475 /* PBXTextBookmark */; + B6697A5A11E7E072002ED475 /* PBXTextBookmark */ = B6697A5A11E7E072002ED475 /* PBXTextBookmark */; + B676058811DAE21100D6B66C /* PBXTextBookmark */ = B676058811DAE21100D6B66C /* PBXTextBookmark */; + B676058911DAE21100D6B66C /* PBXTextBookmark */ = B676058911DAE21100D6B66C /* PBXTextBookmark */; + B676058B11DAE21100D6B66C /* PlistBookmark */ = B676058B11DAE21100D6B66C /* PlistBookmark */; + B676058C11DAE21100D6B66C /* PBXTextBookmark */ = B676058C11DAE21100D6B66C /* PBXTextBookmark */; + B676060711DD4FA600D6B66C /* PBXTextBookmark */ = B676060711DD4FA600D6B66C /* PBXTextBookmark */; + B676064811DEB80600D6B66C /* PBXTextBookmark */ = B676064811DEB80600D6B66C /* PBXTextBookmark */; + B67606C811DED91C00D6B66C /* PBXTextBookmark */ = B67606C811DED91C00D6B66C /* PBXTextBookmark */; + B699A0C211E58D3B00F54CC8 /* PBXTextBookmark */ = B699A0C211E58D3B00F54CC8 /* PBXTextBookmark */; + B6A0F71A11F22CD200AC3547 /* PBXTextBookmark */ = B6A0F71A11F22CD200AC3547 /* PBXTextBookmark */; + B6BED9D111F7B4C30064628F /* PBXTextBookmark */ = B6BED9D111F7B4C30064628F /* PBXTextBookmark */; B6D1D11711FFA83D00196D8E /* PBXTextBookmark */ = B6D1D11711FFA83D00196D8E /* PBXTextBookmark */; - B6D1D11811FFA83D00196D8E /* PBXTextBookmark */ = B6D1D11811FFA83D00196D8E /* PBXTextBookmark */; - B6D1D12811FFAF5500196D8E /* PBXTextBookmark */ = B6D1D12811FFAF5500196D8E /* PBXTextBookmark */; - B6D1D12A11FFB14800196D8E /* PBXTextBookmark */ = B6D1D12A11FFB14800196D8E /* PBXTextBookmark */; - B6D1D12B11FFB14A00196D8E /* PBXTextBookmark */ = B6D1D12B11FFB14A00196D8E /* PBXTextBookmark */; - B6E6A7BD11EAA92100A24C0C = B6E6A7BD11EAA92100A24C0C /* PBXTextBookmark */; - B6FA9C5411FCE85B00F38EC1 = B6FA9C5411FCE85B00F38EC1 /* PBXTextBookmark */; - B6FA9C6611FCE9BC00F38EC1 = B6FA9C6611FCE9BC00F38EC1 /* PBXTextBookmark */; - B6FA9C8711FCF97400F38EC1 = B6FA9C8711FCF97400F38EC1 /* PBXTextBookmark */; + B6E6A7BD11EAA92100A24C0C /* PBXTextBookmark */ = B6E6A7BD11EAA92100A24C0C /* PBXTextBookmark */; + B6FA9C5411FCE85B00F38EC1 /* PBXTextBookmark */ = B6FA9C5411FCE85B00F38EC1 /* PBXTextBookmark */; + B6FA9C6611FCE9BC00F38EC1 /* PBXTextBookmark */ = B6FA9C6611FCE9BC00F38EC1 /* PBXTextBookmark */; + B6FA9C8711FCF97400F38EC1 /* PBXTextBookmark */ = B6FA9C8711FCF97400F38EC1 /* PBXTextBookmark */; }; sourceControlManager = B676054811DADB9100D6B66C /* Source Control */; userBuildSettings = { @@ -248,7 +243,7 @@ ignoreCount = 0; lineNumber = 70; location = 2Term; - modificationTime = 301969234.76163; + modificationTime = 302403342.571883; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -307,7 +302,7 @@ ignoreCount = 0; lineNumber = 23; location = 2Term; - modificationTime = 301969234.762117; + modificationTime = 302403342.57229; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -325,7 +320,7 @@ ignoreCount = 0; lineNumber = 24; location = 2Term; - modificationTime = 301969234.762309; + modificationTime = 302403342.572564; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -339,7 +334,7 @@ vrLen = 725; vrLoc = 144; }; - B6358D0111F6846C00437AA2 /* VT100.mm:500 */ = { + B6358D0111F6846C00437AA2 /* VT100.mm:502 */ = { isa = PBXFileBreakpoint; actions = ( ); @@ -351,13 +346,13 @@ functionName = "-processCharacter:screen:output:"; hitCount = 0; ignoreCount = 0; - lineNumber = 500; + lineNumber = 502; location = 2Term; - modificationTime = 301969234.763671; + modificationTime = 302403342.592766; originalNumberOfMultipleMatches = 1; state = 2; }; - B6358D0311F6846F00437AA2 /* VT100.mm:475 */ = { + B6358D0311F6846F00437AA2 /* VT100.mm:477 */ = { isa = PBXFileBreakpoint; actions = ( ); @@ -369,13 +364,13 @@ functionName = "-processCharacter:screen:output:"; hitCount = 0; ignoreCount = 0; - lineNumber = 475; + lineNumber = 477; location = 2Term; - modificationTime = 301969234.763844; + modificationTime = 302403342.593263; originalNumberOfMultipleMatches = 1; state = 2; }; - B6358D0B11F6852300437AA2 /* VT100.mm:455 */ = { + B6358D0B11F6852300437AA2 /* VT100.mm:457 */ = { isa = PBXFileBreakpoint; actions = ( ); @@ -387,9 +382,9 @@ functionName = "-processCharacter:screen:output:"; hitCount = 0; ignoreCount = 0; - lineNumber = 455; + lineNumber = 457; location = 2Term; - modificationTime = 301969234.764017; + modificationTime = 302403342.593545; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -407,7 +402,7 @@ ignoreCount = 0; lineNumber = 205; location = 2Term; - modificationTime = 301969234.76419; + modificationTime = 302403342.59383; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -431,7 +426,7 @@ vrLen = 396; vrLoc = 0; }; - B642D32A11FFA06800CBB349 /* VT100.mm:609 */ = { + B642D32A11FFA06800CBB349 /* VT100.mm:611 */ = { isa = PBXFileBreakpoint; actions = ( ); @@ -443,32 +438,12 @@ functionName = "-processCharacter:screen:output:"; hitCount = 0; ignoreCount = 0; - lineNumber = 609; + lineNumber = 611; location = 2Term; - modificationTime = 301969234.764396; + modificationTime = 302403342.594124; originalNumberOfMultipleMatches = 1; state = 2; }; - B642D33111FFA14C00CBB349 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = B67606D911DF6DAB00D6B66C /* EmulatorView.mm */; - name = "EmulatorView.mm: 357"; - rLen = 0; - rLoc = 8214; - rType = 0; - vrLen = 529; - vrLoc = 8047; - }; - B642D33511FFA14C00CBB349 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = B64925D911EE6C350065E73A /* VT100.mm */; - name = "VT100.mm: 756"; - rLen = 0; - rLoc = 21016; - rType = 0; - vrLen = 715; - vrLoc = 16517; - }; B642D33711FFA16F00CBB349 /* EmulatorView.mm:181 */ = { isa = PBXFileBreakpoint; actions = ( @@ -483,20 +458,10 @@ ignoreCount = 0; lineNumber = 181; location = 2Term; - modificationTime = 301969234.76459; + modificationTime = 302403342.594397; originalNumberOfMultipleMatches = 1; state = 2; }; - B642D34011FFA2A100CBB349 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = B64925D911EE6C350065E73A /* VT100.mm */; - name = "VT100.mm: 756"; - rLen = 0; - rLoc = 21016; - rType = 0; - vrLen = 1264; - vrLoc = 16383; - }; B64925C411EE622D0065E73A /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = B699A02F11E528BC00F54CC8 /* Screen.cpp */; @@ -516,9 +481,9 @@ }; B64925D911EE6C350065E73A /* VT100.mm */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1513, 13364}}"; - sepNavSelRange = "{21016, 0}"; - sepNavVisRange = "{16416, 1231}"; + sepNavIntBoundsRect = "{{0, 0}, {1383, 13416}}"; + sepNavSelRange = "{18613, 0}"; + sepNavVisRange = "{16605, 2401}"; }; }; B64925ED11EE73ED0065E73A /* VT52.mm:82 */ = { @@ -535,7 +500,7 @@ ignoreCount = 0; lineNumber = 82; location = 2Term; - modificationTime = 301969234.763274; + modificationTime = 302403342.573947; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -553,7 +518,7 @@ ignoreCount = 0; lineNumber = 149; location = 2Term; - modificationTime = 301969234.763494; + modificationTime = 302403342.574301; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -581,7 +546,7 @@ ignoreCount = 0; lineNumber = 460; location = 2Term; - modificationTime = 301969234.75945; + modificationTime = 302403342.568099; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -599,7 +564,7 @@ ignoreCount = 0; lineNumber = 107; location = 2Term; - modificationTime = 301969234.759619; + modificationTime = 302403342.568451; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -617,7 +582,7 @@ ignoreCount = 0; lineNumber = 598; location = 2Term; - modificationTime = 301969234.75978; + modificationTime = 302403342.568763; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -635,7 +600,7 @@ ignoreCount = 0; lineNumber = 607; location = 2Term; - modificationTime = 301969234.759937; + modificationTime = 302403342.569041; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -653,7 +618,7 @@ ignoreCount = 0; lineNumber = 170; location = 2Term; - modificationTime = 301969234.760094; + modificationTime = 302403342.569404; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -671,10 +636,30 @@ ignoreCount = 0; lineNumber = 113; location = 2Term; - modificationTime = 301969234.76026; + modificationTime = 302403342.569642; originalNumberOfMultipleMatches = 1; state = 2; }; + B64F6BEB12064F0200EB2AFF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B67606D911DF6DAB00D6B66C /* EmulatorView.mm */; + name = "EmulatorView.mm: 359"; + rLen = 0; + rLoc = 8213; + rType = 0; + vrLen = 499; + vrLoc = 8133; + }; + B64F6BF6120650D900EB2AFF /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B67606D911DF6DAB00D6B66C /* EmulatorView.mm */; + name = "EmulatorView.mm: 359"; + rLen = 0; + rLoc = 8213; + rType = 0; + vrLen = 896; + vrLoc = 8132; + }; B65FA27911E29E8D00EB447E /* EmulatorView.mm:123 */ = { isa = PBXFileBreakpoint; actions = ( @@ -689,7 +674,7 @@ ignoreCount = 0; lineNumber = 123; location = 2Term; - modificationTime = 301969234.759063; + modificationTime = 302403342.567533; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -758,7 +743,7 @@ ignoreCount = 0; lineNumber = 202; location = 2Term; - modificationTime = 301969234.760428; + modificationTime = 302403342.569898; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -776,7 +761,7 @@ ignoreCount = 0; lineNumber = 201; location = 2Term; - modificationTime = 301969234.760638; + modificationTime = 302403342.570172; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -794,7 +779,7 @@ ignoreCount = 0; lineNumber = 296; location = 2Term; - modificationTime = 301969234.760803; + modificationTime = 302403342.570436; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -812,7 +797,7 @@ ignoreCount = 0; lineNumber = 290; location = 2Term; - modificationTime = 301969234.760969; + modificationTime = 302403342.570763; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -830,7 +815,7 @@ ignoreCount = 0; lineNumber = 258; location = 2Term; - modificationTime = 301969234.761154; + modificationTime = 302403342.571064; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -858,7 +843,7 @@ ignoreCount = 0; lineNumber = 50; location = 2Term; - modificationTime = 301969234.761328; + modificationTime = 302403342.571369; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -1129,7 +1114,7 @@ ignoreCount = 0; lineNumber = 34; location = 2Term; - modificationTime = 301969234.757446; + modificationTime = 302403342.565862; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -1147,7 +1132,7 @@ ignoreCount = 0; lineNumber = 31; location = 2Term; - modificationTime = 301969234.757856; + modificationTime = 302403342.566371; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -1165,7 +1150,7 @@ ignoreCount = 0; lineNumber = 97; location = 2Term; - modificationTime = 301969234.758029; + modificationTime = 302403342.566667; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -1183,7 +1168,7 @@ ignoreCount = 0; lineNumber = 97; location = 2Term; - modificationTime = 301969234.758176; + modificationTime = 302403342.566946; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -1221,9 +1206,9 @@ }; B67606D911DF6DAB00D6B66C /* EmulatorView.mm */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1513, 6279}}"; - sepNavSelRange = "{8214, 0}"; - sepNavVisRange = "{8133, 862}"; + sepNavIntBoundsRect = "{{0, 0}, {1859, 6526}}"; + sepNavSelRange = "{8213, 0}"; + sepNavVisRange = "{8132, 499}"; }; }; B676070811DF8F4100D6B66C /* TermWindowController.m:97 */ = { @@ -1240,7 +1225,7 @@ ignoreCount = 0; lineNumber = 97; location = 2Term; - modificationTime = 301969234.758839; + modificationTime = 302403342.567209; originalNumberOfMultipleMatches = 1; state = 0; }; @@ -1342,51 +1327,11 @@ fRef = B64925D911EE6C350065E73A /* VT100.mm */; name = "VT100.mm: 756"; rLen = 0; - rLoc = 21016; + rLoc = 21709; rType = 0; vrLen = 1231; vrLoc = 16416; }; - B6D1D11811FFA83D00196D8E /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = B67606D911DF6DAB00D6B66C /* EmulatorView.mm */; - name = "EmulatorView.mm: 355"; - rLen = 0; - rLoc = 8214; - rType = 0; - vrLen = 869; - vrLoc = 8064; - }; - B6D1D12811FFAF5500196D8E /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = B67606D911DF6DAB00D6B66C /* EmulatorView.mm */; - name = "EmulatorView.mm: 359"; - rLen = 0; - rLoc = 8214; - rType = 0; - vrLen = 862; - vrLoc = 8133; - }; - B6D1D12A11FFB14800196D8E /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = B67606D911DF6DAB00D6B66C /* EmulatorView.mm */; - name = "EmulatorView.mm: 359"; - rLen = 0; - rLoc = 8214; - rType = 0; - vrLen = 862; - vrLoc = 8133; - }; - B6D1D12B11FFB14A00196D8E /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = B67606D911DF6DAB00D6B66C /* EmulatorView.mm */; - name = "EmulatorView.mm: 359"; - rLen = 0; - rLoc = 8214; - rType = 0; - vrLen = 862; - vrLoc = 8133; - }; B6E6A7BD11EAA92100A24C0C /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = B699A03211E528DE00F54CC8 /* iGeometry.h */; @@ -1411,7 +1356,7 @@ ignoreCount = 0; lineNumber = 449; location = 2Term; - modificationTime = 301969234.762485; + modificationTime = 302403342.572844; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -1429,7 +1374,7 @@ ignoreCount = 0; lineNumber = 486; location = 2Term; - modificationTime = 301969234.762665; + modificationTime = 302403342.573108; originalNumberOfMultipleMatches = 1; state = 2; }; @@ -1446,7 +1391,7 @@ ignoreCount = 0; lineNumber = 468; location = 2Term; - modificationTime = 301969234.76298; + modificationTime = 302403342.573511; originalNumberOfMultipleMatches = 1; state = 2; }; diff --git a/2Term.xcodeproj/kelvin.perspectivev3 b/2Term.xcodeproj/kelvin.perspectivev3 index a80c959..5a18275 100644 --- a/2Term.xcodeproj/kelvin.perspectivev3 +++ b/2Term.xcodeproj/kelvin.perspectivev3 @@ -285,8 +285,8 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 24 - 18 + 17 + 8 0 @@ -334,7 +334,7 @@ _historyCapacity 0 bookmark - B6D1D12B11FFB14A00196D8E + B64F6BF6120650D900EB2AFF history B676058811DAE21100D6B66C @@ -372,7 +372,7 @@ B6FA9C6611FCE9BC00F38EC1 B6FA9C8711FCF97400F38EC1 B6D1D11711FFA83D00196D8E - B642D33111FFA14C00CBB349 + B64F6BEB12064F0200EB2AFF SplitCount @@ -386,16 +386,16 @@ GeometryConfiguration Frame - {{0, 0}, {1574, 497}} + {{0, 0}, {1574, 486}} Module PBXNavigatorGroup Proportion - 497pt + 486pt Proportion - 576pt + 587pt Tabs @@ -409,7 +409,7 @@ GeometryConfiguration Frame - {{10, 27}, {1574, 549}} + {{10, 27}, {1574, 560}} Module XCDetailModule @@ -425,7 +425,7 @@ GeometryConfiguration Frame - {{10, 27}, {714, 416}} + {{10, 27}, {1574, 560}} Module PBXProjectFindModule @@ -512,11 +512,11 @@ TableOfContents - B6D1D11911FFA83D00196D8E + B64F6BD312064CF000EB2AFF 1CA23ED40692098700951B8B - B6D1D11A11FFA83D00196D8E + B64F6BD412064CF000EB2AFF B676054211DADB9000D6B66C - B6D1D11B11FFA83D00196D8E + B64F6BD512064CF000EB2AFF 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -569,14 +569,14 @@ GeometryConfiguration Frame - {{0, 0}, {1920, 453}} + {{0, 0}, {1920, 441}} RubberWindowFrame 0 59 1920 1119 0 0 1920 1178 Module PBXDebugCLIModule Proportion - 453pt + 441pt ContentConfiguration @@ -595,8 +595,8 @@ yes sizes - {{0, 0}, {936, 303}} - {{936, 0}, {984, 303}} + {{0, 0}, {937, 308}} + {{937, 0}, {983, 308}} VerticalSplitView @@ -611,8 +611,8 @@ yes sizes - {{0, 0}, {1920, 303}} - {{0, 303}, {1920, 317}} + {{0, 0}, {1920, 308}} + {{0, 308}, {1920, 324}} @@ -632,7 +632,7 @@ DebugSTDIOWindowFrame {{200, 200}, {500, 300}} Frame - {{0, 458}, {1920, 620}} + {{0, 446}, {1920, 632}} PBXDebugSessionStackFrameViewKey DebugVariablesTableConfiguration @@ -642,10 +642,10 @@ Value 85 Summary - 754 + 753 Frame - {{936, 0}, {984, 303}} + {{937, 0}, {983, 308}} RubberWindowFrame 0 59 1920 1119 0 0 1920 1178 @@ -655,7 +655,7 @@ Module PBXDebugSessionModule Proportion - 620pt + 632pt Name @@ -673,14 +673,14 @@ TableOfContents - B6D1D11C11FFA83D00196D8E + B64F6BD612064CF000EB2AFF 1CCC7628064C1048000F2A68 1CCC7629064C1048000F2A68 - B6D1D11D11FFA83D00196D8E - B6D1D11E11FFA83D00196D8E - B6D1D11F11FFA83D00196D8E - B6D1D12011FFA83D00196D8E - B6D1D12111FFA83D00196D8E + B64F6BD712064CF000EB2AFF + B64F6BD812064CF000EB2AFF + B64F6BD912064CF000EB2AFF + B64F6BDA12064CF000EB2AFF + B676054211DADB9000D6B66C ToolbarConfigUserDefaultsMinorVersion 2 @@ -714,10 +714,9 @@ 5 WindowOrderList - B6D1D12911FFAF5500196D8E - B6D1D12311FFA83D00196D8E - B6D1D12411FFA83D00196D8E - B6D1D12511FFA83D00196D8E + B64F6BDC12064CF000EB2AFF + B64F6BDD12064CF000EB2AFF + B64F6BF312064F0F00EB2AFF /Users/kelvin/Projects/2Term/2Term.xcodeproj WindowString diff --git a/2Term.xcodeproj/project.pbxproj b/2Term.xcodeproj/project.pbxproj index a17a97d..bd8a9f2 100644 --- a/2Term.xcodeproj/project.pbxproj +++ b/2Term.xcodeproj/project.pbxproj @@ -15,13 +15,16 @@ B602376211E94D9800C0B73E /* iGeometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B602376111E94D9800C0B73E /* iGeometry.cpp */; }; B60EBD1211E8DEEF00C1974F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B60EBD1111E8DEEF00C1974F /* QuartzCore.framework */; }; B60EBDE311E90FC300C1974F /* ScanLineFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = B60EBDE211E90FC300C1974F /* ScanLineFilter.m */; }; - B60EBDE811E9143F00C1974F /* ScanLineFilter.cikernel in Sources */ = {isa = PBXBuildFile; fileRef = B60EBDE711E9143F00C1974F /* ScanLineFilter.cikernel */; }; B60EBE2B11E918D500C1974F /* ScanLineFilter.cikernel in Resources */ = {isa = PBXBuildFile; fileRef = B60EBDE711E9143F00C1974F /* ScanLineFilter.cikernel */; }; + B61D0D5D125B740C001C713B /* NewTerminal.xib in Resources */ = {isa = PBXBuildFile; fileRef = B61D0D5B125B740C001C713B /* NewTerminal.xib */; }; + B61D0D60125B7ACA001C713B /* NewTerminalWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = B61D0D5F125B7ACA001C713B /* NewTerminalWindowController.m */; }; + B61D0D63125B89E8001C713B /* EmulatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B61D0D62125B89E8001C713B /* EmulatorManager.m */; }; + B61D0D69125B8E06001C713B /* Defaults.m in Sources */ = {isa = PBXBuildFile; fileRef = B61D0D68125B8E06001C713B /* Defaults.m */; }; B64925DA11EE6C350065E73A /* VT100.mm in Sources */ = {isa = PBXBuildFile; fileRef = B64925D911EE6C350065E73A /* VT100.mm */; }; B669798511E6A786002ED475 /* Lock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B669798411E6A786002ED475 /* Lock.cpp */; }; B6697A0F11E6BF95002ED475 /* CurveView.m in Sources */ = {isa = PBXBuildFile; fileRef = B6697A0E11E6BF95002ED475 /* CurveView.m */; }; B6697A3D11E7CCA0002ED475 /* PTSE.mm in Sources */ = {isa = PBXBuildFile; fileRef = B6697A3C11E7CCA0002ED475 /* PTSE.mm */; }; - B676063B11DEAD3500D6B66C /* TermWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = B676063A11DEAD3500D6B66C /* TermWindowController.m */; }; + B676063B11DEAD3500D6B66C /* TermWindowController.mm in Sources */ = {isa = PBXBuildFile; fileRef = B676063A11DEAD3500D6B66C /* TermWindowController.mm */; }; B676065111DEBAE900D6B66C /* TermWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = B676065011DEBAE900D6B66C /* TermWindow.xib */; }; B67606DA11DF6DAB00D6B66C /* EmulatorView.mm in Sources */ = {isa = PBXBuildFile; fileRef = B67606D911DF6DAB00D6B66C /* EmulatorView.mm */; }; B699A03011E528BC00F54CC8 /* Screen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B699A02F11E528BC00F54CC8 /* Screen.cpp */; }; @@ -42,6 +45,18 @@ }; /* End PBXBuildRule section */ +/* Begin PBXCopyFilesBuildPhase section */ + B61D0D57125B728D001C713B /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 7; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase 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 = ""; }; @@ -59,7 +74,13 @@ B60EBD1111E8DEEF00C1974F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = ""; }; B60EBDE111E90FC300C1974F /* ScanLineFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScanLineFilter.h; sourceTree = ""; }; B60EBDE211E90FC300C1974F /* ScanLineFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScanLineFilter.m; sourceTree = ""; }; - B60EBDE711E9143F00C1974F /* ScanLineFilter.cikernel */ = {isa = PBXFileReference; explicitFileType = sourcecode.glsl; fileEncoding = 4; path = ScanLineFilter.cikernel; sourceTree = ""; }; + B60EBDE711E9143F00C1974F /* ScanLineFilter.cikernel */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ScanLineFilter.cikernel; sourceTree = ""; }; + B61D0D5C125B740C001C713B /* NewTerminal.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = NewTerminal.xib; path = English.lproj/NewTerminal.xib; sourceTree = ""; }; + B61D0D5E125B7ACA001C713B /* NewTerminalWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewTerminalWindowController.h; sourceTree = ""; }; + B61D0D5F125B7ACA001C713B /* NewTerminalWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewTerminalWindowController.m; sourceTree = ""; }; + B61D0D62125B89E8001C713B /* EmulatorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EmulatorManager.m; sourceTree = ""; }; + B61D0D67125B8E06001C713B /* Defaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Defaults.h; sourceTree = ""; }; + B61D0D68125B8E06001C713B /* Defaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Defaults.m; sourceTree = ""; }; B64925D811EE6C350065E73A /* VT100.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VT100.h; sourceTree = ""; }; B64925D911EE6C350065E73A /* VT100.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = VT100.mm; sourceTree = ""; }; B669798311E6A786002ED475 /* Lock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Lock.h; sourceTree = ""; }; @@ -69,7 +90,7 @@ B6697A3B11E7CCA0002ED475 /* PTSE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTSE.h; sourceTree = ""; }; B6697A3C11E7CCA0002ED475 /* PTSE.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PTSE.mm; sourceTree = ""; }; 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 = ""; }; + B676063A11DEAD3500D6B66C /* TermWindowController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TermWindowController.mm; sourceTree = ""; }; B676064D11DEBAE300D6B66C /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/TermWindow.xib; 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 = ""; }; @@ -103,10 +124,12 @@ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( + B61D0D5E125B7ACA001C713B /* NewTerminalWindowController.h */, + B61D0D5F125B7ACA001C713B /* NewTerminalWindowController.m */, 256AC3D80F4B6AC300CF3369 /* TwoTermAppDelegate.h */, 256AC3D90F4B6AC300CF3369 /* TwoTermAppDelegate.m */, B676063911DEAD3500D6B66C /* TermWindowController.h */, - B676063A11DEAD3500D6B66C /* TermWindowController.m */, + B676063A11DEAD3500D6B66C /* TermWindowController.mm */, B67606D811DF6DAB00D6B66C /* EmulatorView.h */, B67606D911DF6DAB00D6B66C /* EmulatorView.mm */, B6EBE2B311E0EA9100EA0458 /* CharacterGenerator.h */, @@ -165,6 +188,8 @@ 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( + B61D0D67125B8E06001C713B /* Defaults.h */, + B61D0D68125B8E06001C713B /* Defaults.m */, 256AC3F00F4B6AF500CF3369 /* TwoTerm_Prefix.pch */, 29B97316FDCFA39411CA2CEA /* main.m */, ); @@ -174,6 +199,7 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + B61D0D5B125B740C001C713B /* NewTerminal.xib */, B60EBDE711E9143F00C1974F /* ScanLineFilter.cikernel */, B66979CE11E6BCAE002ED475 /* images */, 8D1107310486CEB800E47090 /* TwoTerm-Info.plist */, @@ -217,6 +243,7 @@ isa = PBXGroup; children = ( B699A08B11E5720F00F54CC8 /* Emulator.h */, + B61D0D62125B89E8001C713B /* EmulatorManager.m */, B6697A3B11E7CCA0002ED475 /* PTSE.h */, B6697A3C11E7CCA0002ED475 /* PTSE.mm */, B6F444C611E41AC000C3A836 /* VT05.h */, @@ -239,6 +266,7 @@ 8D1107290486CEB800E47090 /* Resources */, 8D11072C0486CEB800E47090 /* Sources */, 8D11072E0486CEB800E47090 /* Frameworks */, + B61D0D57125B728D001C713B /* CopyFiles */, ); buildRules = ( B60EBE2311E9182E00C1974F /* PBXBuildRule */, @@ -258,7 +286,12 @@ isa = PBXProject; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "2Term" */; compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + en, + English, + ); mainGroup = 29B97314FDCFA39411CA2CEA /* 2Term */; projectDirPath = ""; projectRoot = ""; @@ -277,6 +310,7 @@ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */, B676065111DEBAE900D6B66C /* TermWindow.xib in Resources */, + B61D0D5D125B740C001C713B /* NewTerminal.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -289,7 +323,7 @@ files = ( 8D11072D0486CEB800E47090 /* main.m in Sources */, 256AC3DA0F4B6AC300CF3369 /* TwoTermAppDelegate.m in Sources */, - B676063B11DEAD3500D6B66C /* TermWindowController.m in Sources */, + B676063B11DEAD3500D6B66C /* TermWindowController.mm in Sources */, B67606DA11DF6DAB00D6B66C /* EmulatorView.mm in Sources */, B6EBE2B511E0EA9100EA0458 /* CharacterGenerator.m in Sources */, B6F444C811E41AC000C3A836 /* VT05.mm in Sources */, @@ -300,9 +334,11 @@ B6697A0F11E6BF95002ED475 /* CurveView.m in Sources */, B6697A3D11E7CCA0002ED475 /* PTSE.mm in Sources */, B60EBDE311E90FC300C1974F /* ScanLineFilter.m in Sources */, - B60EBDE811E9143F00C1974F /* ScanLineFilter.cikernel in Sources */, B602376211E94D9800C0B73E /* iGeometry.cpp in Sources */, B64925DA11EE6C350065E73A /* VT100.mm in Sources */, + B61D0D60125B7ACA001C713B /* NewTerminalWindowController.m in Sources */, + B61D0D63125B89E8001C713B /* EmulatorManager.m in Sources */, + B61D0D69125B8E06001C713B /* Defaults.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -325,6 +361,14 @@ name = MainMenu.xib; sourceTree = ""; }; + B61D0D5B125B740C001C713B /* NewTerminal.xib */ = { + isa = PBXVariantGroup; + children = ( + B61D0D5C125B740C001C713B /* NewTerminal.xib */, + ); + name = NewTerminal.xib; + sourceTree = ""; + }; B676065011DEBAE900D6B66C /* TermWindow.xib */ = { isa = PBXVariantGroup; children = ( @@ -387,6 +431,7 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; diff --git a/Defaults.h b/Defaults.h new file mode 100644 index 0000000..bae2af9 --- /dev/null +++ b/Defaults.h @@ -0,0 +1,21 @@ +// +// Defaults.h +// 2Term +// +// Created by Kelvin Sherlock on 10/5/2010. +// Copyright (c) 2010 __MyCompanyName__. All rights reserved. +// + +#import + + +#ifdef __cplusplus +extern "C" { +#endif + + extern NSString *kNotificationNewTerminal; + + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/Defaults.m b/Defaults.m new file mode 100644 index 0000000..150d224 --- /dev/null +++ b/Defaults.m @@ -0,0 +1,12 @@ +// +// Defaults.m +// 2Term +// +// Created by Kelvin Sherlock on 10/5/2010. +// Copyright (c) 2010 __MyCompanyName__. All rights reserved. +// + +#import "Defaults.h" + + +NSString *kNotificationNewTerminal = @"com.ksherlock.iiTerm: New Terminal"; diff --git a/Emulator.h b/Emulator.h index 6c0b9e0..bfdc936 100644 --- a/Emulator.h +++ b/Emulator.h @@ -9,6 +9,7 @@ #include @class NSEvent; +@class NSMenu; #ifdef __cplusplus class Screen; @@ -20,12 +21,23 @@ class OutputChannel; #import "iGeometry.h" + +@interface EmulatorManager : NSObject + ++(void)registerClass: (Class)klass; ++(NSMenu *)emulatorMenu; ++(id)emulatorForTag: (unsigned)tag; + +@end + @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; ++(NSString *)name; -(NSString *)name; -(const char *)termName; diff --git a/EmulatorManager.m b/EmulatorManager.m new file mode 100644 index 0000000..b1ae8db --- /dev/null +++ b/EmulatorManager.m @@ -0,0 +1,80 @@ +// +// EmulatorManager.m +// 2Term +// +// Created by Kelvin Sherlock on 10/5/2010. +// Copyright (c) 2010 __MyCompanyName__. All rights reserved. +// + +#import "Emulator.h" +#import + +@implementation EmulatorManager + +static NSMutableArray *array = nil; + ++(id)alloc +{ + return nil; +} ++(id)new +{ + return nil; +} + +-(id)init +{ + [self release]; + return nil; +} + ++(void)load +{ + array = [NSMutableArray new]; +} + ++(void)registerClass: (Class)klass +{ + if (klass && [klass conformsToProtocol: @protocol(Emulator)]) + { + @synchronized (self) + { + [array addObject: klass]; + } + } + +} + ++(NSMenu *)emulatorMenu +{ + NSMenu *menu = [[[NSMenu alloc] initWithTitle: @"Terminal Type"] autorelease]; + + @synchronized (self) + { + unsigned index = 0; + for (Class klass in array) + { + NSMenuItem *item = [[NSMenuItem new] autorelease]; + + [item setTitle: [klass name]]; + [item setTag: ++index]; + [menu addItem: item]; + } + } + + return menu; +} + ++(id)emulatorForTag: (unsigned)tag +{ + @synchronized(self) + { + if (tag && tag < [array count]) + { + return [array objectAtIndex: tag - 1]; + } + } + return nil; + +} +@end diff --git a/EmulatorView.h b/EmulatorView.h index 776edb4..c736ea9 100644 --- a/EmulatorView.h +++ b/EmulatorView.h @@ -74,6 +74,8 @@ private: } @property (nonatomic, assign) int fd; +@property (nonatomic, retain) NSObject *emulator; + //@property (nonatomic, assign) iPoint cursor; diff --git a/EmulatorView.mm b/EmulatorView.mm index 867de0c..43434d9 100644 --- a/EmulatorView.mm +++ b/EmulatorView.mm @@ -25,7 +25,7 @@ @implementation EmulatorView @synthesize fd = _fd; - +@synthesize emulator = _emulator; #pragma mark - #pragma mark properties @@ -82,8 +82,14 @@ _cursorImg = [[_charGen imageForCharacter: '_'] retain]; - _emulator = [VT52 new]; + //_emulator = [VT52 new]; + + // enable drag+drop for files/urls. + + + [self registerForDraggedTypes:[NSArray arrayWithObjects: NSFilenamesPboardType, NSURLPboardType , nil]]; + } -(BOOL)isFlipped @@ -119,7 +125,7 @@ -(void)drawRect:(NSRect)dirtyRect { - NSRect bounds = [self bounds]; + //NSRect bounds = [self bounds]; NSRect screenRect = dirtyRect; @@ -285,44 +291,19 @@ -(void)autoTypeText:(NSString *)text { - - typedef void (*ProcessCharFX)(id, SEL, uint8_t, Screen *, OutputChannel *); + NSData *data = [text dataUsingEncoding: NSASCIIStringEncoding allowLossyConversion: YES]; - - std::vector chars; - std::vector::iterator iter; - iRect updateRect; // should be nil but whatever... + unsigned length = [data length]; OutputChannel channel(_fd); - SEL cmd = @selector(processCharacter: screen: output:); - ProcessCharFX fx = (ProcessCharFX)[_emulator methodForSelector: cmd]; - - - unsigned length = [text length]; - + if (!length) return; - chars.resize(length); - - [text getCharacters: &chars[0] range: NSMakeRange(0, length)]; - - _screen.beginUpdate(); - - - // this posts as if it was output, need to post as if it was input - for (iter = chars.begin(); iter != chars.end(); ++iter) - { - fx(_emulator,cmd, *iter, &_screen, &channel); - } - - - updateRect = _screen.endUpdate(); - - [self invalidateIRect: updateRect]; - + // bad form to write directly rather than going through Emulator object? + channel.write([data bytes], length); } @@ -543,6 +524,86 @@ + +#pragma mark - +#pragma mark Drag/Drop + + +- (NSDragOperation)draggingEntered:(id )sender { + + NSPasteboard *pboard; + pboard = [sender draggingPasteboard]; + + NSArray *types = [pboard types]; + + if ([types containsObject: NSFilenamesPboardType]) return NSDragOperationCopy; + if ([types containsObject: NSURLPboardType]) return NSDragOperationCopy; + + + return NSDragOperationNone; +} + +- (BOOL)performDragOperation:(id )sender { + NSPasteboard *pboard; + NSDragOperation sourceDragMask; + NSArray *types; + + sourceDragMask = [sender draggingSourceOperationMask]; + pboard = [sender draggingPasteboard]; + + + types = [pboard types]; + + + if ([types containsObject: NSFilenamesPboardType]) + { + NSArray *array = [pboard propertyListForType: NSFilenamesPboardType]; + NSString *string = (NSString *)[array objectAtIndex: 0]; + + string = [string stringByReplacingOccurrencesOfString: @"\\" withString: @"\\\\"]; + string = [string stringByReplacingOccurrencesOfString: @" " withString: @"\\ "]; + + [self autoTypeText: string]; + + + //NSArray *array = [pboard propertyListForType: NSFilenamesPboardType]; + //NSLog(@"%@", [array class]); + //NSLog(@"%@", [pboard propertyListForType: NSFilenamesPboardType]); + return YES; + } + + + + + if ([types containsObject: NSURLPboardType]) + { + NSArray *array = [pboard propertyListForType: NSURLPboardType]; + NSObject *object = (NSObject *)[array objectAtIndex: 0]; + + if ([object isKindOfClass: [NSString class]]) + { + [self autoTypeText: (NSString *)object]; + return YES; + } + + if ([object isKindOfClass: [NSURL class]]) + { + [self autoTypeText: [(NSURL *)object absoluteString]]; + return YES; + } + + // if file://, use the pathname? + + + //NSLog(@"%@", [array class]); + //NSLog(@"%@", [pboard propertyListForType: NSURLPboardType]); + } + + return NO; +} + + + @end diff --git a/English.lproj/NewTerminal.xib b/English.lproj/NewTerminal.xib new file mode 100644 index 0000000..37936c5 --- /dev/null +++ b/English.lproj/NewTerminal.xib @@ -0,0 +1,490 @@ + + + + 1060 + 10F569 + 1197 + 1038.29 + + YES + NSView + NSMenu + NSWindowTemplate + NSMenuItem + NSTextField + NSTextFieldCell + NSPopUpButton + NSPopUpButtonCell + NSButtonCell + NSButton + NSCustomObject + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + NewTerminalWindowController + + + FirstResponder + + + NSApplication + + + 263 + 2 + {{196, 240}, {300, 175}} + 544736256 + New Terminal + NSWindow + + + + 256 + + YES + + + 266 + {{121, 130}, {159, 26}} + + + + YES + + -2080244160 + 134219776 + + LucidaGrande + 13 + 1040 + + + -2038284033 + 163 + + + 400 + 75 + + + VT 52 + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + 1 + + + YES + + OtherViews + + YES + + + + VT 100 + + 1048576 + 2147483647 + + + _popUpItemAction: + 2 + + + + + + 1 + YES + YES + 2 + + + + + 268 + {{17, 135}, {99, 17}} + + + + YES + + 68288064 + 272630784 + Terminal Type: + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 289 + {{162, 18}, {118, 25}} + + + + YES + + -2080244224 + 134217728 + Connect + + + -2038152961 + 163 + + DQ + 400 + 75 + + + + + 292 + {{20, 18}, {118, 25}} + + + + YES + + -2080244224 + 134217728 + Cancel + + + -2038152961 + 163 + + Gw + 400 + 75 + + + + {{7, 11}, {300, 175}} + + + + + {{0, 0}, {1920, 1178}} + {1e+13, 1e+13} + + + + + YES + + + window + + + + 38 + + + + delegate + + + + 39 + + + + cancelButton: + + + + 40 + + + + connectButton: + + + + 41 + + + + _terminalTypeButton + + + + 42 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + YES + + + + + + 2 + + + YES + + + + + + + + + 3 + + + YES + + + + + + 4 + + + YES + + + + + + 5 + + + YES + + + + + + + 6 + + + + + 7 + + + + + 9 + + + YES + + + + + + 10 + + + + + 17 + + + YES + + + + + + 18 + + + + + 19 + + + YES + + + + + + 20 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1.IBPluginDependency + 1.IBWindowTemplateEditedContentRect + 1.NSWindowTemplate.visibleAtLaunch + 1.WindowOrigin + 1.editorWindowContentRectSynchronizationRect + 10.IBPluginDependency + 17.IBPluginDependency + 18.IBPluginDependency + 19.IBPluginDependency + 2.IBPluginDependency + 20.IBPluginDependency + 3.IBPluginDependency + 4.IBPluginDependency + 9.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{357, 418}, {480, 270}} + + {196, 240} + {{357, 418}, {480, 270}} + 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 + + + + YES + + + YES + + + + + YES + + + YES + + + + 48 + + + + YES + + NewTerminalWindowController + NSWindowController + + YES + + YES + cancelButton: + connectButton: + + + YES + id + id + + + + _terminalTypeButton + NSPopUpButton + + + IBProjectSource + ./classes-xjh84/NewTerminalWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + + 3 + + diff --git a/English.lproj/TermWindow.xib b/English.lproj/TermWindow.xib index f7374ce..e5cf62e 100644 --- a/English.lproj/TermWindow.xib +++ b/English.lproj/TermWindow.xib @@ -3,16 +3,14 @@ 1060 10F569 - 788 + 1197 1038.29 - 461.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 788 - - + YES - + NSCustomView + NSWindowTemplate + NSView + NSCustomObject YES @@ -46,7 +44,6 @@ Two Term [VT52] NSWindow - {1.79769e+308, 1.79769e+308} {620, 444} @@ -63,24 +60,30 @@ 274 {{10, 10}, {560, 384}} + + EmulatorView {{20, 20}, {580, 404}} + + CurveView - {620, 444} + {{7, 11}, {620, 444}} + + {{0, 0}, {1920, 1178}} {620, 466} - {1.79769e+308, 1.79769e+308} + {1e+13, 1e+13} - + YES @@ -106,6 +109,26 @@ 6 + + + displayPatternTitle1: emulator.name + + + + + + displayPatternTitle1: emulator.name + displayPatternTitle1 + emulator.name + + NSDisplayPattern + %{title1}@ + + 2 + + + 11 + @@ -179,8 +202,6 @@ 1.NSWindowTemplate.visibleAtLaunch 1.WindowOrigin 1.editorWindowContentRectSynchronizationRect - 1.windowTemplate.hasMinSize - 1.windowTemplate.minSize 2.IBPluginDependency 5.IBPluginDependency 9.IBPluginDependency @@ -193,8 +214,6 @@ {196, 240} {{202, 428}, {480, 270}} - - {620, 444} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -216,7 +235,7 @@ - 9 + 11 @@ -226,15 +245,28 @@ NSView IBProjectSource - CurveView.h + ./classes-xjh84/CurveView.h EmulatorView NSView + + YES + + YES + copy: + paste: + + + YES + id + id + + IBProjectSource - EmulatorView.h + ./classes-xjh84/EmulatorView.h @@ -242,433 +274,22 @@ NSWindowController _emulatorView - EmulatorView - - - _emulatorView - - _emulatorView - EmulatorView - + id IBProjectSource - TermWindowController.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 - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CIImageProvider.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 + ./classes-xjh84/TermWindowController.h 0 IBCocoaFramework - + com.apple.InterfaceBuilder.CocoaPlugin.macosx - + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 diff --git a/NewTerminalWindowController.h b/NewTerminalWindowController.h new file mode 100644 index 0000000..b140582 --- /dev/null +++ b/NewTerminalWindowController.h @@ -0,0 +1,23 @@ +// +// NewTerminalWindowController.h +// 2Term +// +// Created by Kelvin Sherlock on 10/5/2010. +// Copyright (c) 2010 __MyCompanyName__. All rights reserved. +// + +#import + + +@interface NewTerminalWindowController : NSWindowController { +@private + + IBOutlet NSPopUpButton *_terminalTypeButton; +} + +-(IBAction)cancelButton: (id)sender; +-(IBAction)connectButton: (id)sender; + + + +@end diff --git a/NewTerminalWindowController.m b/NewTerminalWindowController.m new file mode 100644 index 0000000..231dbdb --- /dev/null +++ b/NewTerminalWindowController.m @@ -0,0 +1,72 @@ +// +// NewTerminalWindowController.m +// 2Term +// +// Created by Kelvin Sherlock on 10/5/2010. +// Copyright (c) 2010 __MyCompanyName__. All rights reserved. +// + +#import "NewTerminalWindowController.h" +#import "Emulator.h" + +@implementation NewTerminalWindowController + + ++(id)new +{ + return [[self alloc] initWithWindowNibName: @"NewTerminal"]; + +} + + +- (void)dealloc { + // Clean-up code here. + + [_terminalTypeButton release]; + + [super dealloc]; +} + +- (void)windowDidLoad { + + [super windowDidLoad]; + + + [_terminalTypeButton setMenu: [EmulatorManager emulatorMenu]]; + +} + + + +-(IBAction)cancelButton: (id)sender +{ + [[self window] performClose: self]; +} + +-(IBAction)connectButton: (id)sender +{ + + NSMenuItem *item = [_terminalTypeButton selectedItem]; + unsigned tag = [item tag]; + + Class klass = [EmulatorManager emulatorForTag: tag]; + + if (klass) + { + // post notificiation... + } + + + [[self window] performClose: self]; +} + + +#pragma mark - +#pragma mark NSWindowDelegate + +-(void)windowWillClose:(NSNotification *)notification +{ + [self autorelease]; +} + +@end diff --git a/PTSE.mm b/PTSE.mm index 874b833..da37986 100644 --- a/PTSE.mm +++ b/PTSE.mm @@ -39,6 +39,11 @@ enum { return "proterm-special"; } ++(NSString *)name +{ + return @"Proterm Special Emulation"; +} + -(NSString *)name { return @"Proterm Special Emulation"; @@ -49,6 +54,19 @@ enum { _state = StateText; } +-(BOOL)resizable +{ + return NO; +} + +-(struct winsize)defaultSize +{ + struct winsize ws = { 24, 80, 0, 0 }; + + return ws; +} + + -(void)processCharacter:(uint8_t)c screen:(Screen *)screen output:(OutputChannel *)output { diff --git a/TermWindowController.h b/TermWindowController.h index 1e076c0..86e71f8 100644 --- a/TermWindowController.h +++ b/TermWindowController.h @@ -10,15 +10,20 @@ @class EmulatorView; - -@interface TermWindowController : NSWindowController { +@protocol Emulator; + +@interface TermWindowController : NSWindowController { IBOutlet EmulatorView *_emulatorView; + NSObject *_emulator; + int _child; } +@property (nonatomic, retain) NSObject *emulator; + -(void)initPTY; @end diff --git a/TermWindowController.m b/TermWindowController.mm similarity index 53% rename from TermWindowController.m rename to TermWindowController.mm index e64504e..f4a7f64 100644 --- a/TermWindowController.m +++ b/TermWindowController.mm @@ -14,21 +14,35 @@ #include #include #include -#include #include #include +#include +#include + @implementation TermWindowController +@synthesize emulator = _emulator; + +(id)new { return [[self alloc] initWithWindowNibName: @"TermWindow"]; } +-(void)dealloc +{ + [_emulator release]; + [_emulatorView release]; + + [super dealloc]; +} + +/* -(void)awakeFromNib { [self initPTY]; } +*/ -(void)initPTY { @@ -64,18 +78,44 @@ } if (pid == 0) { - const char *environ[] = { - "TERM=vt100", - "LANG=C", - "TERM_PROGRAM=2Term", - NULL - }; + + std::vector environ; + std::string s; + ; + + s.append("TERM_PROGRAM=2Term"); + s.append(1, (char)0); + + s.append("LANG=C"); + s.append(1, (char)0); + + s.append("TERM="); + s.append([_emulator termName]); + + s.append(1, (char)0); + s.append(1, (char )0); + + for (std::string::size_type index = 0;;) + { + environ.push_back(&s[index]); + + index = s.find((char)0, index); + if (index == std::string::npos) break; + + if (s[++index] == 0) break; + + } + + environ.push_back(NULL); + + // call login -f [username] + // -p -- do NOT ignore environment. // export TERM=... - - execle("/usr/bin/login", "login", "-f", "kelvin", NULL, environ); + // TODO -- option for localhost, telnet, ssh, etc. + execle("/usr/bin/login", "login", "-pf", getlogin(), NULL, &environ[0]); fprintf(stderr, "execle failed\n"); fflush(stderr); @@ -95,4 +135,25 @@ } +#pragma mark - +#pragma mark NSWindowDelegate + +- (void)windowDidLoad +{ + NSWindow *window = [self window]; + + [super windowDidLoad]; + + + [window setTitle: [_emulator name]]; + [_emulatorView setEmulator: _emulator]; + + [self initPTY]; +} + +-(void)windowWillClose:(NSNotification *)notification +{ + [self autorelease]; +} + @end diff --git a/TwoTermAppDelegate.h b/TwoTermAppDelegate.h index afbd21b..77786ba 100644 --- a/TwoTermAppDelegate.h +++ b/TwoTermAppDelegate.h @@ -15,4 +15,8 @@ @property (assign) IBOutlet NSWindow *window; @property (assign) IBOutlet NSImageView *imageView; + + +-(void)newTerminal: (NSNotification *)notification; + @end diff --git a/TwoTermAppDelegate.m b/TwoTermAppDelegate.m index 687f366..c3a85b5 100644 --- a/TwoTermAppDelegate.m +++ b/TwoTermAppDelegate.m @@ -9,7 +9,8 @@ #import "TwoTermAppDelegate.h" #import "TermWindowController.h" - +#import "Defaults.h" +#import "VT52.h" @implementation TwoTermAppDelegate @@ -18,20 +19,48 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { - // Insert code here to initialize your application - /* - NSImage *image; - CGImageRef imgRef = ImageForCharacter('A'); + + TermWindowController *controller; + - image = [[NSImage alloc] initWithCGImage: imgRef size: CGSizeZero]; + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [imageView setImage: image]; - [image release]; - CGImageRelease(imgRef); - */ + [nc addObserver: self selector: @selector(newTerminal:) name: kNotificationNewTerminal object: nil]; - NSWindowController * win = [TermWindowController new]; - [win showWindow: nil]; + + controller = [TermWindowController new]; + [controller showWindow: nil]; + // this leak is ok. } +-(void)dealloc { + + [[NSNotificationCenter defaultCenter] removeObserver: self]; + + [super dealloc]; +} + + +-(void)newTerminal: (NSNotification *)notification +{ + + TermWindowController *controller; + + NSDictionary *userInfo = [notification userInfo]; + + + Class klass = [userInfo objectForKey: @"Class"]; + if ([klass conformsToProtocol: @protocol(Emulator)]) + klass = [VT52 class]; + + + + controller = [TermWindowController new]; + [controller setEmulator: [[klass new] autorelease]]; + [controller showWindow: nil]; + // this leak is ok. +} + + + @end diff --git a/VT05.mm b/VT05.mm index 930b4dd..8a5ae0e 100644 --- a/VT05.mm +++ b/VT05.mm @@ -41,6 +41,11 @@ enum { }; ++(NSString *)name +{ + return @"vt05"; +} + -(NSString *)name { return @"vt05"; diff --git a/VT100.mm b/VT100.mm index a344841..e46f11c 100644 --- a/VT100.mm +++ b/VT100.mm @@ -37,6 +37,13 @@ enum { return self; } + + ++(NSString *)name +{ + return @"VT100"; +} + -(NSString *)name { return @"VT100"; @@ -193,7 +200,7 @@ enum { _state = StateDCAX; } - else if (_state = StateDCAX) + else if (_state == StateDCAX) { if (c == 0x00) return; diff --git a/VT52.mm b/VT52.mm index 2f62d10..ce73759 100644 --- a/VT52.mm +++ b/VT52.mm @@ -41,6 +41,11 @@ enum { @implementation VT52 ++(NSString *)name +{ + return @"VT52"; +} + -(NSString *)name { switch (_model)