* fixed all compilation issues of printkit-stuff with gcc4 on Linux
* removed leagcy _sstream-header, we now use sstream, as both compilers provide it git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19109 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
class SpoolMetaData {
|
class SpoolMetaData {
|
||||||
|
typedef std::string string;
|
||||||
private:
|
private:
|
||||||
string fDescription;
|
string fDescription;
|
||||||
string fMimeType;
|
string fMimeType;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class PCL6Driver;
|
|||||||
|
|
||||||
class PCL6WriterStream {
|
class PCL6WriterStream {
|
||||||
public:
|
public:
|
||||||
|
virtual ~PCL6WriterStream() {}
|
||||||
virtual void write(const uint8 *data, uint32 size) = 0;
|
virtual void write(const uint8 *data, uint32 size) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -268,6 +268,7 @@ class ListIterator
|
|||||||
virtual bool DoItem(BListItem* item) = 0;
|
virtual bool DoItem(BListItem* item) = 0;
|
||||||
public:
|
public:
|
||||||
static bool DoIt(BListItem* item, void* data);
|
static bool DoIt(BListItem* item, void* data);
|
||||||
|
virtual ~ListIterator() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ THE SOFTWARE.
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "LinePathBuilder.h"
|
#include "LinePathBuilder.h"
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
static const float kNearZero = 0.000000000001;
|
static const float kNearZero = 0.000000000001;
|
||||||
static const float kMinPenSize = 0.0001;
|
static const float kMinPenSize = 0.0001;
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Link(PDFWriter* writer, BString* utf8);
|
Link(PDFWriter* writer, BString* utf8);
|
||||||
|
virtual ~Link() {}
|
||||||
void Do();
|
void Do();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -882,26 +882,6 @@ PDFWriter::Paint(bool stroke)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// --------------------------------------------------
|
|
||||||
bool
|
|
||||||
PDFWriter::IsSame(const pattern &p1, const pattern &p2)
|
|
||||||
{
|
|
||||||
char *a = (char*)p1.data;
|
|
||||||
char *b = (char*)p2.data;
|
|
||||||
return memcmp(a, b, 8) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// --------------------------------------------------
|
|
||||||
bool
|
|
||||||
PDFWriter::IsSame(const rgb_color &c1, const rgb_color &c2)
|
|
||||||
{
|
|
||||||
char *a = (char*)&c1;
|
|
||||||
char *b = (char*)&c1;
|
|
||||||
return memcmp(a, b, sizeof(rgb_color)) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
void
|
void
|
||||||
PDFWriter::SetColor()
|
PDFWriter::SetColor()
|
||||||
|
|||||||
@@ -394,6 +394,26 @@ class PDFWriter : public PrinterDriver, public PictureIterator
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------------------------------------
|
||||||
|
inline bool
|
||||||
|
PDFWriter::IsSame(const pattern &p1, const pattern &p2)
|
||||||
|
{
|
||||||
|
char *a = (char*)p1.data;
|
||||||
|
char *b = (char*)p2.data;
|
||||||
|
return memcmp(a, b, 8) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------------------------------------
|
||||||
|
inline bool
|
||||||
|
PDFWriter::IsSame(const rgb_color &c1, const rgb_color &c2)
|
||||||
|
{
|
||||||
|
char *a = (char*)&c1;
|
||||||
|
char *b = (char*)&c1;
|
||||||
|
return memcmp(a, b, sizeof(rgb_color)) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// PDFLib C callbacks class instance redirectors
|
// PDFLib C callbacks class instance redirectors
|
||||||
size_t _WriteData(PDF *p, void *data, size_t size);
|
size_t _WriteData(PDF *p, void *data, size_t size);
|
||||||
void _ErrorHandler(PDF *p, int type, const char *msg);
|
void _ErrorHandler(PDF *p, int type, const char *msg);
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ PageSetupWindow::PageSetupWindow(BMessage *msg, const char *printerName)
|
|||||||
margin.right = page.right - margin.right;
|
margin.right = page.right - margin.right;
|
||||||
margin.bottom = page.bottom - margin.bottom;
|
margin.bottom = page.bottom - margin.bottom;
|
||||||
|
|
||||||
fMarginView = new MarginView(BRect(20,20,200,160), width, height,
|
fMarginView = new MarginView(BRect(20,20,200,160), (int32)width, (int32)height,
|
||||||
margin, units);
|
margin, units);
|
||||||
panel->AddChild(fMarginView);
|
panel->AddChild(fMarginView);
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ PageSetupWindow::PageSetupWindow(BMessage *msg, const char *printerName)
|
|||||||
margin.Set(0, 0, 0, 0);
|
margin.Set(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
fMarginView = new MarginView(BRect(20,20,200,160), width, height,
|
fMarginView = new MarginView(BRect(20,20,200,160), (int32)width, (int32)height,
|
||||||
margin, units);
|
margin, units);
|
||||||
panel->AddChild(fMarginView);
|
panel->AddChild(fMarginView);
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "Utils.h"
|
#include "Utils.h"
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
EscapeMessageFilter::EscapeMessageFilter(BWindow *window, int32 what)
|
EscapeMessageFilter::EscapeMessageFilter(BWindow *window, int32 what)
|
||||||
|
|||||||
@@ -529,7 +529,7 @@ JobSetupView::AttachedToWindow()
|
|||||||
fGamma = new JSDSlider(gamma_rect, "gamma", "Gamma", new BMessage(kMsgQuality), -300, 300, B_BLOCK_THUMB);
|
fGamma = new JSDSlider(gamma_rect, "gamma", "Gamma", new BMessage(kMsgQuality), -300, 300, B_BLOCK_THUMB);
|
||||||
|
|
||||||
fGamma->SetLimitLabels("Brighter", "Darker");
|
fGamma->SetLimitLabels("Brighter", "Darker");
|
||||||
fGamma->SetValue(100 * log(fJobData->getGamma()) / log(2.0));
|
fGamma->SetValue((int32)(100 * log(fJobData->getGamma()) / log(2.0)));
|
||||||
fGamma->SetHashMarks(B_HASH_MARKS_BOTH);
|
fGamma->SetHashMarks(B_HASH_MARKS_BOTH);
|
||||||
fGamma->SetHashMarkCount(7);
|
fGamma->SetHashMarkCount(7);
|
||||||
box->AddChild(fGamma);
|
box->AddChild(fGamma);
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
#ifndef __HttpURLConnection_H
|
#ifndef __HttpURLConnection_H
|
||||||
#define __HttpURLConnection_H
|
#define __HttpURLConnection_H
|
||||||
|
|
||||||
#include <istream.h>
|
#include <iostream>
|
||||||
#include <ostream.h>
|
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
#ifndef __IppContent_H
|
#ifndef __IppContent_H
|
||||||
#define __IppContent_H
|
#define __IppContent_H
|
||||||
|
|
||||||
#include <istream.h>
|
#include <iostream>
|
||||||
#include <ostream.h>
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ ssize_t IppTransport::Write(const void *buffer, size_t size)
|
|||||||
{
|
{
|
||||||
// DBGMSG(("write: %d\n", size));
|
// DBGMSG(("write: %d\n", size));
|
||||||
|
|
||||||
if (!__fs.write(buffer, size)) {
|
if (!__fs.write((const char *)buffer, size)) {
|
||||||
__error = true;
|
__error = true;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#else
|
#else
|
||||||
# include <net/socket.h>
|
# include <net/socket.h>
|
||||||
#endif
|
#endif
|
||||||
#include <ostream.h>
|
#include <iostream>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
char *itoa(int i, char *buf, int unit)
|
char *itoa(int i, char *buf, int unit)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include "_sstream"
|
#include <sstream>
|
||||||
|
|
||||||
#include "LpsClient.h"
|
#include "LpsClient.h"
|
||||||
#include "LprSetupDlg.h"
|
#include "LprSetupDlg.h"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
# include <net/netdb.h>
|
# include <net/netdb.h>
|
||||||
#endif
|
#endif
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "_sstream"
|
#include <sstream>
|
||||||
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
#ifndef __LPSCLIENT_H
|
#ifndef __LPSCLIENT_H
|
||||||
#define __LPSCLIENT_H
|
#define __LPSCLIENT_H
|
||||||
|
|
||||||
#include <istream.h>
|
#include <iostream>
|
||||||
#include <ostream.h>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#if (!__MWERKS__)
|
#if (!__MWERKS__)
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
#ifndef __Socket_H
|
#ifndef __Socket_H
|
||||||
#define __Socket_H
|
#define __Socket_H
|
||||||
|
|
||||||
#include <istream.h>
|
#include <iostream>
|
||||||
#include <ostream.h>
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,7 @@
|
|||||||
#ifndef __SocketStream_H
|
#ifndef __SocketStream_H
|
||||||
#define __SocketStream_H
|
#define __SocketStream_H
|
||||||
|
|
||||||
#include <istream.h>
|
#include <iostream>
|
||||||
#include <ostream.h>
|
|
||||||
#include <streambuf.h>
|
|
||||||
|
|
||||||
class Socket;
|
class Socket;
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
* _sstream
|
|
||||||
* Copyright 1999 Y.Takagi. All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if __MWERKS__
|
|
||||||
#include <sstream>
|
|
||||||
#else
|
|
||||||
|
|
||||||
#ifndef __SSTREAM_H
|
|
||||||
#define __SSTREAM_H
|
|
||||||
|
|
||||||
#include <strstream>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
class ostringstream : public ostrstream {
|
|
||||||
public:
|
|
||||||
ostringstream() : ostrstream() {}
|
|
||||||
~ostringstream() { delete [] ostrstream::str(); }
|
|
||||||
string str() { *this << ends; return string(ostrstream::str()); }
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __SSTREAM_H */
|
|
||||||
#endif /* USING_STRSTREAM */
|
|
||||||
Reference in New Issue
Block a user