added: -I.. flag for Makefiles when compiling

changed: in SpaceToJSON::PrintToken():
         slash doesn't have to be escaped when serializing to JSON




git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@444 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2013-10-15 23:53:57 +00:00
parent aa394b1e4f
commit 3cc5fd5e12
6 changed files with 9 additions and 8 deletions

View File

@ -1,11 +1,11 @@
# Makefile for GNU make
ifndef CXX
CXX = g++
CXX = clang++
endif
ifndef CXXFLAGS
CXXFLAGS = -Wall -O2 -I/usr/local/include -I.. -L/usr/local/lib
CXXFLAGS = -Wall -O2 -I/usr/local/include
endif
ifndef LDFLAGS

View File

@ -9,7 +9,7 @@ $(libname): $(o)
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $<
$(CXX) -c $(CXXFLAGS) -I.. $<

View File

@ -9,7 +9,7 @@ $(libname): $(o)
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $<
$(CXX) -c $(CXXFLAGS) -I.. $<

View File

@ -9,7 +9,7 @@ $(libname): $(o)
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $<
$(CXX) -c $(CXXFLAGS) -I.. $<

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2012, Tomasz Sowa
* Copyright (c) 2012-2013, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -122,13 +122,14 @@ void SpaceToJSON::PrintToken(Stream & out, const StringType & str, bool is_speci
{
switch(str[i])
{
case 0: out << '\\'; out << '0'; break; // may skip this character is better?
case 0: out << '\\'; out << '0'; break; // may to skip this character is better?
case '\r': out << '\\'; out << 'r'; break;
case '\n': out << '\\'; out << 'n'; break;
case '\t': out << '\\'; out << 't'; break;
case 0x08: out << '\\'; out << 'b'; break;
case 0x0c: out << '\\'; out << 'f'; break;
case '\\': out << '\\'; out << '\\'; break;
//case '/': out << '\\'; out << '/'; break; // slash doesn't have to be escaped
case '"': out << '\\'; out << '\"'; break;
default:
out << str[i];

View File

@ -9,7 +9,7 @@ $(libname): $(o)
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $<
$(CXX) -c $(CXXFLAGS) -I.. $<