Include xterm BEL sequence to terminate OSC, standardize Makefile variables
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user