Fixes for cross-platform build.
This commit is contained in:
14
Streams.cpp
14
Streams.cpp
@@ -46,9 +46,10 @@ shared_ptr<int> getHostDescriptor()
|
||||
return descriptor;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_STREAMS
|
||||
shared_ptr<FILE> getComHostStream()
|
||||
{
|
||||
static shared_ptr<FILE> stream{ fopen("/tmp/comhost.txt", "wb"), [](FILE *f){
|
||||
static shared_ptr<FILE> stream{ fopen(DEBUG_STREAMS "comhost.txt", "wb"), [](FILE *f){
|
||||
clog << "Closing comhost stream" << endl;
|
||||
fclose(f);
|
||||
} };
|
||||
@@ -61,7 +62,7 @@ shared_ptr<FILE> getComHostStream()
|
||||
|
||||
shared_ptr<FILE> getHostPacketStream()
|
||||
{
|
||||
static shared_ptr<FILE> stream{ initHTML(fopen("/tmp/hostpackets.html", "wb"), "Host Packets"), [](FILE *f){
|
||||
static shared_ptr<FILE> stream{ initHTML(fopen(DEBUG_STREAMS "hostpackets.html", "wb"), "Host Packets"), [](FILE *f){
|
||||
clog << "Closing hostPackets stream" << endl;
|
||||
closeHTML(f);
|
||||
} };
|
||||
@@ -74,7 +75,7 @@ shared_ptr<FILE> getHostPacketStream()
|
||||
|
||||
shared_ptr<FILE> getHostAPDUStream()
|
||||
{
|
||||
static shared_ptr<FILE> stream{ initHTML(fopen("/tmp/hostAPDU.html", "wb"), "Host APDU"), [](FILE *f){
|
||||
static shared_ptr<FILE> stream{ initHTML(fopen(DEBUG_STREAMS "hostAPDU.html", "wb"), "Host APDU"), [](FILE *f){
|
||||
clog << "Closing host APDU stream" << endl;
|
||||
closeHTML(f);
|
||||
} };
|
||||
@@ -87,7 +88,7 @@ shared_ptr<FILE> getHostAPDUStream()
|
||||
|
||||
shared_ptr<FILE> getComDevStream()
|
||||
{
|
||||
static shared_ptr<FILE> stream{ fopen("/tmp/comdev.txt", "wb"), [](FILE *f){
|
||||
static shared_ptr<FILE> stream{ fopen(DEBUG_STREAMS "comdev.txt", "wb"), [](FILE *f){
|
||||
clog << "Closing comdev stream" << endl;
|
||||
fclose(f);
|
||||
} };
|
||||
@@ -100,7 +101,7 @@ shared_ptr<FILE> getComDevStream()
|
||||
|
||||
shared_ptr<FILE> getDevPacketStream()
|
||||
{
|
||||
static shared_ptr<FILE> stream{ initHTML(fopen("/tmp/devpackets.html", "wb"), "Dev Packets"), [](FILE *f){
|
||||
static shared_ptr<FILE> stream{ initHTML(fopen(DEBUG_STREAMS "devpackets.html", "wb"), "Dev Packets"), [](FILE *f){
|
||||
clog << "Closing devPackets stream" << endl;
|
||||
closeHTML(f);
|
||||
} };
|
||||
@@ -113,7 +114,7 @@ shared_ptr<FILE> getDevPacketStream()
|
||||
|
||||
shared_ptr<FILE> getDevAPDUStream()
|
||||
{
|
||||
static shared_ptr<FILE> stream{ initHTML(fopen("/tmp/devAPDU.html", "wb"), "Dev APDU"), [](FILE *f){
|
||||
static shared_ptr<FILE> stream{ initHTML(fopen(DEBUG_STREAMS "devAPDU.html", "wb"), "Dev APDU"), [](FILE *f){
|
||||
clog << "Closing dev APDU stream" << endl;
|
||||
closeHTML(f);
|
||||
} };
|
||||
@@ -124,7 +125,6 @@ shared_ptr<FILE> getDevAPDUStream()
|
||||
return stream;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_STREAMS
|
||||
FILE* initHTML(FILE *fPtr, const string &title)
|
||||
{
|
||||
fprintf(fPtr, "<html>\n"
|
||||
|
||||
Reference in New Issue
Block a user