Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: tools/ddbg_service/lib/terminfo.dart

Issue 1497033003: - Remove the legacy debug protocol. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/ddbg_service/lib/debugger.dart ('k') | tools/ddbg_service/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ddbg_service/lib/terminfo.dart
diff --git a/tools/ddbg_service/lib/terminfo.dart b/tools/ddbg_service/lib/terminfo.dart
deleted file mode 100644
index 0ec886018d356df690b371e35e951c78171d27a4..0000000000000000000000000000000000000000
--- a/tools/ddbg_service/lib/terminfo.dart
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library terminfo;
-
-import 'dart:convert';
-import 'dart:io';
-
-int _tputGetInteger(String capName) {
- var result = Process.runSync('tput', ['$capName'], stdoutEncoding:UTF8);
- if (result.exitCode != 0) {
- return 0;
- }
- return int.parse(result.stdout);
-}
-
-String _tputGetSequence(String capName) {
- var result = Process.runSync('tput', ['$capName'], stdoutEncoding:UTF8);
- if (result.exitCode != 0) {
- return '';
- }
- return result.stdout;
-}
-
-class TermInfo {
- TermInfo() {
- resize();
- }
-
- int get lines => _lines;
- int get cols => _cols;
-
- int _lines;
- int _cols;
-
- void resize() {
- _lines = _tputGetInteger('lines');
- _cols = _tputGetInteger('cols');
- }
-
- // Back one character.
- final String cursorBack = _tputGetSequence('cub1');
-
- // Forward one character.
- final String cursorForward = _tputGetSequence('cuf1');
-
- // Up one character.
- final String cursorUp = _tputGetSequence('cuu1');
-
- // Down one character.
- final String cursorDown = _tputGetSequence('cud1');
-
- // Clear to end of line.
- final String clrEOL = _tputGetSequence('el');
-
- // Clear screen and home cursor.
- final String clear = _tputGetSequence('clear');
-}
« no previous file with comments | « tools/ddbg_service/lib/debugger.dart ('k') | tools/ddbg_service/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698