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

Side by Side Diff: tools/ddbg_service/lib/terminfo.dart

Issue 575853002: Add tools/ddbg_service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js Created 6 years, 3 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/ddbg_service/lib/debugger.dart ('k') | tools/ddbg_service/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library terminfo;
6
5 import 'dart:convert'; 7 import 'dart:convert';
6 import 'dart:io'; 8 import 'dart:io';
7 9
8 int _tputGetInteger(String capName) { 10 int _tputGetInteger(String capName) {
9 var result = Process.runSync('tput', ['$capName'], stdoutEncoding:UTF8); 11 var result = Process.runSync('tput', ['$capName'], stdoutEncoding:UTF8);
10 if (result.exitCode != 0) { 12 if (result.exitCode != 0) {
11 return 0; 13 return 0;
12 } 14 }
13 return int.parse(result.stdout); 15 return int.parse(result.stdout);
14 } 16 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 50
49 // Down one character. 51 // Down one character.
50 final String cursorDown = _tputGetSequence('cud1'); 52 final String cursorDown = _tputGetSequence('cud1');
51 53
52 // Clear to end of line. 54 // Clear to end of line.
53 final String clrEOL = _tputGetSequence('el'); 55 final String clrEOL = _tputGetSequence('el');
54 56
55 // Clear screen and home cursor. 57 // Clear screen and home cursor.
56 final String clear = _tputGetSequence('clear'); 58 final String clear = _tputGetSequence('clear');
57 } 59 }
OLDNEW
« 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