* Removed translations of debug output in TermParse.cpp.

* Minor style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36709 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-05-07 09:13:28 +00:00
parent 95ddf069fb
commit 62a8fd3b65
2 changed files with 22 additions and 26 deletions
+1 -2
View File
@@ -41,8 +41,7 @@ DoCatalogs Terminal :
Shell.cpp Shell.cpp
SmartTabView.cpp SmartTabView.cpp
TermApp.cpp TermApp.cpp
TermParse.cpp
TermView.cpp TermView.cpp
TermWindow.cpp TermWindow.cpp
: en.catalog : en.catalog
; ;
+20 -23
View File
@@ -1,12 +1,14 @@
/* /*
* Copyright 2001-2009, Haiku, Inc. * Copyright 2001-2010, Haiku, Inc.
* Copyright (c) 2003-4 Kian Duffy <[email protected]> * Copyright (c) 2003-4 Kian Duffy <[email protected]>
* Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai. * Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
* Distributed under the terms of the MIT license. * Distributed under the terms of the MIT license.
*/ */
//! Escape sequence parse and character encoding. //! Escape sequence parse and character encoding.
#include "TermParse.h" #include "TermParse.h"
#include <ctype.h> #include <ctype.h>
@@ -43,12 +45,9 @@ extern int gEscIgnoreTable[]; /* ESC ignore table */
extern int gMbcsTable[]; /* ESC $ */ extern int gMbcsTable[]; /* ESC $ */
#define DEFAULT -1 #define DEFAULT -1
#define NPARAM 10 // Max parameters #define NPARAM 10 // Max parameters
#undef TR_CONTEXT
#define TR_CONTEXT "Terminal TermParse"
//! Get char from pty reader buffer. //! Get char from pty reader buffer.
inline uchar inline uchar
@@ -276,32 +275,32 @@ TermParse::DumpState(int *groundtable, int *parsestate, uchar c)
} tables[] = { } tables[] = {
#define T(t) \ #define T(t) \
{ t, #t } { t, #t }
T(gUTF8GroundTable), T(gUTF8GroundTable),
T(gCS96GroundTable), T(gCS96GroundTable),
T(gISO8859GroundTable), T(gISO8859GroundTable),
T(gSJISGroundTable), T(gSJISGroundTable),
T(gEscTable), T(gEscTable),
T(gCsiTable), T(gCsiTable),
T(gDecTable), T(gDecTable),
T(gScrTable), T(gScrTable),
T(gIgnoreTable), T(gIgnoreTable),
T(gIesTable), T(gIesTable),
T(gEscIgnoreTable), T(gEscIgnoreTable),
T(gMbcsTable), T(gMbcsTable),
{ NULL, NULL } { NULL, NULL }
}; };
int i; int i;
fprintf(stderr, B_TRANSLATE("groundtable: ")); fprintf(stderr, "groundtable: ");
for (i = 0; tables[i].p; i++) { for (i = 0; tables[i].p; i++) {
if (tables[i].p == groundtable) if (tables[i].p == groundtable)
fprintf(stderr, "%s\t", tables[i].name); fprintf(stderr, "%s\t", tables[i].name);
} }
fprintf(stderr, B_TRANSLATE("parsestate: ")); fprintf(stderr, "parsestate: ");
for (i = 0; tables[i].p; i++) { for (i = 0; tables[i].p; i++) {
if (tables[i].p == parsestate) if (tables[i].p == parsestate)
fprintf(stderr, "%s\t", tables[i].name); fprintf(stderr, "%s\t", tables[i].name);
} }
fprintf(stderr, B_TRANSLATE("char: 0x%02x (%d)\n"), c, c); fprintf(stderr, "char: 0x%02x (%d)\n", c, c);
} }
@@ -345,9 +344,7 @@ TermParse::EscParse()
//DumpState(groundtable, parsestate, c); //DumpState(groundtable, parsestate, c);
if (currentEncoding != fBuffer->Encoding()) { if (currentEncoding != fBuffer->Encoding()) {
/* // Change coding, change parse table.
* Change coding, change parse table.
*/
switch (fBuffer->Encoding()) { switch (fBuffer->Encoding()) {
case B_ISO1_CONVERSION: case B_ISO1_CONVERSION:
case B_ISO2_CONVERSION: case B_ISO2_CONVERSION: