Initial terminal emulation sketch

This commit is contained in:
Keith Winstein
2011-01-18 03:18:21 -05:00
parent 725b9889e0
commit ae3fc72e82
4 changed files with 33 additions and 2 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
source = parse.cpp parserstate.cpp parser.cpp templates.cpp
objects = parserstate.o parser.o templates.o
source = parse.cpp parserstate.cpp parser.cpp templates.cpp terminal.cpp
objects = parserstate.o parser.o templates.o terminal.o
executables = parse
CXX = g++
+2
View File
@@ -43,6 +43,8 @@ Parser::UTF8Parser::UTF8Parser()
fprintf( stderr, "rtm requires a UTF-8 locale.\n" );
throw std::string( "rtm requires a UTF-8 locale." );
}
assert( BUF_SIZE >= MB_CUR_MAX );
}
std::vector<Parser::Action *> Parser::UTF8Parser::input( char c )
+1
View File
@@ -0,0 +1 @@
#include "terminal.hpp"
+28
View File
@@ -0,0 +1,28 @@
#ifndef TERMINAL_CPP
#define TERMINAL_CPP
#include <wchar.h>
#include "parser.hpp"
namespace Terminal {
class Terminal {
private:
Parser::UTF8Parser parser;
wchar_t *framebuffer;
size_t width, height;
size_t cursor_col, cursor_row;
public:
Terminal();
~Terminal();
Terminal( const Terminal & );
Terminal &operator=( const Terminal & );
};
}
#endif