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
|
objects = parserstate.o parser.o templates.o
|
||||||
executables = parse
|
executables = parse
|
||||||
|
|
||||||
CPP = g++
|
CXX = 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
|
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
|
LIBS = -lutil
|
||||||
|
|
||||||
all: $(executables)
|
all: $(executables)
|
||||||
|
|
||||||
parse: parse.o $(objects)
|
parse: parse.o $(objects)
|
||||||
$(CPP) $(CPPFLAGS) -o $@ $+ $(LIBS)
|
$(CXX) $(CXXFLAGS) -o $@ $+ $(LIBS)
|
||||||
|
|
||||||
templates.o: templates.cpp
|
templates.o: templates.cpp
|
||||||
$(CPP) $(CPPFLAGS) -frepo -c -o $@ $<
|
$(CXX) $(CXXFLAGS) -frepo -c -o $@ $<
|
||||||
|
|
||||||
%.o: %.cpp
|
%.o: %.cpp
|
||||||
$(CPP) $(CPPFLAGS) -c -o $@ $<
|
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
include depend
|
include depend
|
||||||
|
|
||||||
depend: $(source)
|
depend: $(source)
|
||||||
$(CPP) $(INCLUDES) -MM $(source) > depend
|
$(CXX) $(INCLUDES) -MM $(source) > depend
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <typeinfo>
|
||||||
|
|
||||||
#include "parser.hpp"
|
#include "parser.hpp"
|
||||||
|
|
||||||
@@ -253,8 +254,9 @@ int vt_parser( struct stripstate *state )
|
|||||||
for ( std::vector<Parser::Action>::iterator j = actions.begin();
|
for ( std::vector<Parser::Action>::iterator j = actions.begin();
|
||||||
j != actions.end();
|
j != actions.end();
|
||||||
j++ ) {
|
j++ ) {
|
||||||
|
|
||||||
if ( j->char_present ) {
|
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 {
|
} else {
|
||||||
printf( "[%s] ", j->name.c_str() );
|
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 );
|
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 );
|
return Transition( Ignore(), &family->s_Ground );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user