From 3cc5fd5e128a8b6cee87313a6f448072a1997ff6 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Tue, 15 Oct 2013 23:53:57 +0000 Subject: [PATCH] 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 --- Makefile | 4 ++-- date/Makefile | 2 +- mainparser/Makefile | 2 +- space/Makefile | 2 +- space/spacetojson.h | 5 +++-- utf8/Makefile | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index bac5ef4..552cb43 100755 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/date/Makefile b/date/Makefile index fc7c747..011431e 100644 --- a/date/Makefile +++ b/date/Makefile @@ -9,7 +9,7 @@ $(libname): $(o) %.o: %.cpp - $(CXX) -c $(CXXFLAGS) $< + $(CXX) -c $(CXXFLAGS) -I.. $< diff --git a/mainparser/Makefile b/mainparser/Makefile index bb4ebca..728fcea 100644 --- a/mainparser/Makefile +++ b/mainparser/Makefile @@ -9,7 +9,7 @@ $(libname): $(o) %.o: %.cpp - $(CXX) -c $(CXXFLAGS) $< + $(CXX) -c $(CXXFLAGS) -I.. $< diff --git a/space/Makefile b/space/Makefile index bc35b46..bd991ea 100755 --- a/space/Makefile +++ b/space/Makefile @@ -9,7 +9,7 @@ $(libname): $(o) %.o: %.cpp - $(CXX) -c $(CXXFLAGS) $< + $(CXX) -c $(CXXFLAGS) -I.. $< diff --git a/space/spacetojson.h b/space/spacetojson.h index 0bb1551..c2296df 100644 --- a/space/spacetojson.h +++ b/space/spacetojson.h @@ -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]; diff --git a/utf8/Makefile b/utf8/Makefile index 6e87c15..70500a8 100755 --- a/utf8/Makefile +++ b/utf8/Makefile @@ -9,7 +9,7 @@ $(libname): $(o) %.o: %.cpp - $(CXX) -c $(CXXFLAGS) $< + $(CXX) -c $(CXXFLAGS) -I.. $<