Include xterm BEL sequence to terminate OSC, standardize Makefile variables

This commit is contained in:
Keith Winstein
2011-01-10 03:51:55 -05:00
parent 546068a5ed
commit 3174e4f659
3 changed files with 10 additions and 8 deletions
+6 -6
View File
@@ -2,25 +2,25 @@ source = parse.cpp parserstate.cpp parser.cpp templates.cpp
objects = parserstate.o parser.o templates.o
executables = parse
CPP = g++
CPPFLAGS = -g --std=c++0x -pedantic -Werror -Wall -Wextra -Weffc++ -fno-implicit-templates -pipe -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_GNU_SOURCE
CXX = g++
CXXFLAGS = -g --std=c++0x -pedantic -Werror -Wall -Wextra -Weffc++ -fno-implicit-templates -pipe -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_GNU_SOURCE
LIBS = -lutil
all: $(executables)
parse: parse.o $(objects)
$(CPP) $(CPPFLAGS) -o $@ $+ $(LIBS)
$(CXX) $(CXXFLAGS) -o $@ $+ $(LIBS)
templates.o: templates.cpp
$(CPP) $(CPPFLAGS) -frepo -c -o $@ $<
$(CXX) $(CXXFLAGS) -frepo -c -o $@ $<
%.o: %.cpp
$(CPP) $(CPPFLAGS) -c -o $@ $<
$(CXX) $(CXXFLAGS) -c -o $@ $<
include depend
depend: $(source)
$(CPP) $(INCLUDES) -MM $(source) > depend
$(CXX) $(INCLUDES) -MM $(source) > depend
.PHONY: clean
clean:
+3 -1
View File
@@ -12,6 +12,7 @@
#include <assert.h>
#include <wctype.h>
#include <iostream>
#include <typeinfo>
#include "parser.hpp"
@@ -253,8 +254,9 @@ int vt_parser( struct stripstate *state )
for ( std::vector<Parser::Action>::iterator j = actions.begin();
j != actions.end();
j++ ) {
if ( j->char_present ) {
printf( "%s(%lc) ", j->name.c_str(), j->ch );
printf( "%s(0x%02d=%lc) ", j->name.c_str(), j->ch, j->ch );
} else {
printf( "[%s] ", j->name.c_str() );
}
+1 -1
View File
@@ -339,7 +339,7 @@ Transition OSC_String::input_state_rule( wchar_t ch )
return Transition( OSC_Put(), NULL );
}
if ( ch == 0x9C ) {
if ( (ch == 0x9C) || (ch == 0x07) ) { /* 0x07 is xterm non-ANSI variant */
return Transition( Ignore(), &family->s_Ground );
}