diff --git a/src/apps/terminal/Shell.cpp b/src/apps/terminal/Shell.cpp index 80f192ca1f..0d53785455 100644 --- a/src/apps/terminal/Shell.cpp +++ b/src/apps/terminal/Shell.cpp @@ -30,6 +30,14 @@ * */ + +#include "Shell.h" + +#include "TermConst.h" +#include "TermParse.h" + +#include + #include #include #include @@ -46,13 +54,53 @@ #include #include -#include +#define MAXPTTYS 16 * 4 -#include "TermConst.h" -#include "TermParse.h" -#include "TermView.h" -#include "Shell.h" -#include "PrefHandler.h" +#ifndef CEOF +#define CEOF ('D'&037) +#endif +#ifndef CSUSP +#define CSUSP ('@'&037) +#endif +#ifndef CQUIT +#define CQUIT ('\\'&037) +#endif +#ifndef CEOL +#define CEOL 0 +#endif +#ifndef CSTOP +#define CSTOP ('Q'&037) +#endif +#ifndef CSTART +#define CSTART ('S'&037) +#endif +#ifndef CSWTCH +#define CSWTCH 0 +#endif + +/* + * ANSI emulation. + */ +#define INQ 0x05 +#define FF 0x0C /* C0, C1 control names */ +#define LS1 0x0E +#define LS0 0x0F +#define CAN 0x18 +#define SUB 0x1A +#define ESC 0x1B +#define US 0x1F +#define DEL 0x7F +#define HTS ('H'+0x40) +#define SS2 0x8E +#define SS3 0x8F +#define DCS 0x90 +#define OLDID 0x9A /* ESC Z */ +#define CSI 0x9B +#define ST 0x9C +#define OSC 0x9D +#define PM 0x9E +#define APC 0x9F +#define RDEL 0xFF /* default shell command and options. */ #define SHELL_COMMAND "/bin/sh -login" diff --git a/src/apps/terminal/Shell.h b/src/apps/terminal/Shell.h index 2dd7590a21..f6497ff426 100644 --- a/src/apps/terminal/Shell.h +++ b/src/apps/terminal/Shell.h @@ -1,4 +1,5 @@ /* + * Copyright 2007 Haiku, Inc. * Copyright (c) 2003-4 Kian Duffy * Copyright (c) 2004 Daniel Furrer * Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai. @@ -32,54 +33,7 @@ #ifndef _SHELL_H #define _SHELL_H -#define MAXPTTYS 16 * 4 - -#ifndef CEOF -#define CEOF ('D'&037) -#endif -#ifndef CSUSP -#define CSUSP ('@'&037) -#endif -#ifndef CQUIT -#define CQUIT ('\\'&037) -#endif -#ifndef CEOL -#define CEOL 0 -#endif -#ifndef CSTOP -#define CSTOP ('Q'&037) -#endif -#ifndef CSTART -#define CSTART ('S'&037) -#endif -#ifndef CSWTCH -#define CSWTCH 0 -#endif - -/* - * ANSI emulation. - */ -#define INQ 0x05 -#define FF 0x0C /* C0, C1 control names */ -#define LS1 0x0E -#define LS0 0x0F -#define CAN 0x18 -#define SUB 0x1A -#define ESC 0x1B -#define US 0x1F -#define DEL 0x7F -#define HTS ('H'+0x40) -#define SS2 0x8E -#define SS3 0x8F -#define DCS 0x90 -#define OLDID 0x9A /* ESC Z */ -#define CSI 0x9B -#define ST 0x9C -#define OSC 0x9D -#define PM 0x9E -#define APC 0x9F -#define RDEL 0xFF - +#include // TODO: Maybe merge TermParse and Shell classes ? class TermParse; diff --git a/src/apps/terminal/TermView.cpp b/src/apps/terminal/TermView.cpp index 1f354f9ebe..16e2fc18b5 100644 --- a/src/apps/terminal/TermView.cpp +++ b/src/apps/terminal/TermView.cpp @@ -19,7 +19,6 @@ #include "Shell.h" #include "TermBuffer.h" #include "TermConst.h" -#include "TermParse.h" #include "VTkeymap.h" #include