File lm1100.1.0.2a.dif of Package filters

--- CMYLookup.h
+++ CMYLookup.h	2005-10-05 11:50:40.000000000 +0200
@@ -33,7 +33,7 @@
 
  public:
 	CMYLookup();
-	~CMYLookup();
+	virtual ~CMYLookup();
 
 	void touchDataLines(Map *imageMap, int start,int len,void *ptr);
 };
--- DataImage.h
+++ DataImage.h	2005-10-05 11:50:40.000000000 +0200
@@ -37,7 +37,7 @@
 	virtual void getRGB(RGB *rgb, int x, int y) = 0;
 
 	DataImage();
-	~DataImage();
+	virtual ~DataImage();
 };
 
 
--- ErrorDiffusionAlg.h
+++ ErrorDiffusionAlg.h	2005-10-05 11:50:40.000000000 +0200
@@ -39,7 +39,7 @@
 	
  public:
 	ErrorDiffusionAlg(int brightness);
-	~ErrorDiffusionAlg();
+	virtual ~ErrorDiffusionAlg();
 
 	void touchDataLines(Map *imageMap, int start,int len,void *ptr);
 };
--- Head.cc
+++ Head.cc	2005-10-05 11:50:40.000000000 +0200
@@ -83,7 +83,7 @@
 
 void Head::paint()
 {	
-    int first = 1;
+//	int first = 1;
 	int i;
 
 	Coord imageStart(0,0);
@@ -136,7 +136,7 @@
     //paint the image
     while(1)
     {
-		int finished;
+//		int finished;
 
 		int y;
 
--- Image.h
+++ Image.h	2005-10-05 11:50:40.000000000 +0200
@@ -31,6 +31,7 @@
 
 	virtual void cacheLines(int start, int len) = 0;
 	virtual void getRGB(RGB *rgb, int x, int y) = 0;
+	virtual ~Image() {}
 };
 
 #endif
--- Jet.h
+++ Jet.h	2005-10-05 11:51:23.000000000 +0200
@@ -45,7 +45,7 @@
 	Coord imageStart;  // start of image from edge of paper
 
 	bool insideImage(int x, int y);
-	bool Jet::needsPainting(int ix, int iy, int bit);
+	bool needsPainting(int ix, int iy, int bit);
 	
  public:
 	/* Range of paper jet covers when head is at 0,0 */
@@ -54,7 +54,7 @@
 	/* Range of paper jet needs to cover to get the entire image */
 	void getImageRange(Rect *dest);
 	Coord *getPreferredImageStart(Coord *start);
-	int Jet::getPreferredEnd();
+	int getPreferredEnd();
 	bool finished();
 	void setImageStart(Coord *imageStart);
 	void paint(int startX, int endX, int y, class LexmarkProtocol *protocol);
--- LexmarkProtocol.h
+++ LexmarkProtocol.h	2005-10-05 11:50:40.000000000 +0200
@@ -46,6 +46,7 @@
 
 	//returns the page size in logical printer pixels
 	virtual Rect getPageSize(int pageType)=0;
+	virtual ~LexmarkProtocol() {}
 };
 
 #endif
--- LexmarkProtocol300c.cc
+++ LexmarkProtocol300c.cc	2005-10-05 11:50:40.000000000 +0200
@@ -69,7 +69,7 @@
 Jet **LexmarkProtocol300c::createJets(int *numJets, Map *imageMap)
 {
 	*numJets = 6;
-	class Jet **jets = new (Jet *)[6];
+	class Jet **jets = new Jet *[6];
 	jets[0] = new Jet(0,9,0,imageMap,LEFT_JET,0,8);
 	jets[1] = new Jet(1,0,0,imageMap,RIGHT_JET,0,8);
 	jets[2] = new Jet(2,-9,20,imageMap,LEFT_JET,1,8);
--- LexmarkProtocol300c.h
+++ LexmarkProtocol300c.h	2005-10-05 11:50:40.000000000 +0200
@@ -61,7 +61,7 @@
 	Rect getPageSize(int pageType);
 	
 	LexmarkProtocol300c(Writer *writer);
-	~LexmarkProtocol300c();
+	virtual ~LexmarkProtocol300c();
 };
 
 #endif
--- LexmarkProtocolBW.cc
+++ LexmarkProtocolBW.cc	2005-10-05 11:50:40.000000000 +0200
@@ -68,7 +68,7 @@
 Jet **LexmarkProtocolBW::createJets(int *numJets, Map *imageMap)
 {
 	*numJets = 2;
-	class Jet **jets = new (Jet *)[2];
+	class Jet **jets = new Jet *[2];
 	jets[0] = new Jet(0,9,0,imageMap,LEFT_JET,0,28);
 	jets[1] = new Jet(0,0,0,imageMap,RIGHT_JET,0,28);
 
--- LexmarkProtocolBW.h
+++ LexmarkProtocolBW.h	2005-10-05 11:50:40.000000000 +0200
@@ -61,7 +61,7 @@
 	Rect getPageSize(int pageType);
 	
 	LexmarkProtocolBW(Writer *writer);
-	~LexmarkProtocolBW();
+	virtual ~LexmarkProtocolBW();
 };
 
 #endif
--- LinkedList.h
+++ LinkedList.h	2005-10-05 11:51:23.000000000 +0200
@@ -26,8 +26,8 @@
 	void *object;
 	LinkedList *next;
 
-	LinkedList::LinkedList();
-	LinkedList::LinkedList(void * object);
+	LinkedList();
+	LinkedList(void * object);
 };
 
 #endif
--- Makefile
+++ Makefile	2005-10-05 11:50:40.000000000 +0200
@@ -7,7 +7,7 @@
 VERSION=lm1100.1.0.2a
 TARFILES = $(FILES:%=$(VERSION)/%)
 
-CC = g++ -O2
+CC = g++ $(RPM_OPT_FLAGS) -Wall -pipe
 #CC = g++ -g
 
 lm1100: $(OBJS)
@@ -26,6 +26,10 @@
 clean:
 	rm *.o
 
+install:  lm1100
+	mkdir -p $(DESTDIR)/usr/bin
+	install -m 0755 lm1100 $(DESTDIR)/usr/bin/
+
 %.o:	%.cc
 	$(CC) $(DEFINES) -c $<
 
--- Map.h
+++ Map.h	2005-10-05 11:51:23.000000000 +0200
@@ -41,7 +41,7 @@
 	int height; /* height of map in cells */
 
 	Map(int width, int height, int cellSize);
-	Map::~Map();
+	~Map();
 
 	void cacheLines(int start, int len);
 	void addAlgorithm(MapAlgorithm *algorithm);
--- MapAlgorithm.h
+++ MapAlgorithm.h	2005-10-05 11:50:40.000000000 +0200
@@ -26,7 +26,7 @@
 {
  public:
 	virtual void touchDataLines(Map *map, int start,int len,void *ptr)=0;
-	
+	virtual ~MapAlgorithm() {}
 };
 
 
--- PBMRaw.cc
+++ PBMRaw.cc	2005-10-05 11:50:40.000000000 +0200
@@ -103,6 +103,7 @@
 	return false;
 }
 
+#ifdef PBM_TEST
 static void test(char *filename)
 {
 	int old_j, j,x,y;
@@ -150,9 +151,6 @@
 	
 }
 
-
-#ifdef PBM_TEST
-
 int main(int argc, char **argv)
 {
 	if(argc != 2)
--- PBMRaw.h
+++ PBMRaw.h	2005-10-05 11:50:40.000000000 +0200
@@ -35,6 +35,7 @@
 	/* returns true if matches magic number, false otherwise
 	 */
 	static bool isMagic(char *line);
+	virtual ~PBMRaw() {}
 };
 
 
--- PPMRaw.cc
+++ PPMRaw.cc	2005-10-05 11:50:40.000000000 +0200
@@ -106,6 +106,7 @@
 }
 
 
+#ifdef PPM_TEST
 static void test(char *filename)
 {
 	int old_j, j,x,y;
@@ -152,6 +153,7 @@
 	}
 	
 }
+#endif
 
 
 bool PPMRaw::isMagic(char *line)
--- PPMRaw.h
+++ PPMRaw.h	2005-10-05 11:51:23.000000000 +0200
@@ -32,7 +32,7 @@
 
  public:
 	PPMRaw(Reader *reader,bool readMagic);
-	static void PPMRaw::readHeader(int *width, int *height, int *maxval, Reader *reader, bool readMagic);
+	static void readHeader(int *width, int *height, int *maxval, Reader *reader, bool readMagic);
 	
 	virtual void getRGB(RGB *rgb, int x, int y);
 
--- PPMRawAlg.h
+++ PPMRawAlg.h	2005-10-05 11:50:40.000000000 +0200
@@ -37,6 +37,7 @@
 	PPMRawAlg(Reader *reader,bool readMagic);
 	void touchDataLines(Map *map, int start,int len,void *ptr);
 	void skipToEnd();
+	virtual ~PPMRawAlg() {}
 };
 
 #endif
--- PaintLine.h
+++ PaintLine.h	2005-10-05 11:50:40.000000000 +0200
@@ -28,6 +28,7 @@
  public:
 	virtual void pad(int pad_amount) = 0;
 	virtual void paint(int sx,int x, int nozzle, int color) = 0;
+	virtual ~PaintLine() {}
 };
 
 #include "LexmarkProtocol.h"
--- PaintLine300c.h
+++ PaintLine300c.h	2005-10-05 11:50:40.000000000 +0200
@@ -32,7 +32,7 @@
 	int size;
 	int x,y;
 
-	friend LexmarkProtocol300c;
+	friend class LexmarkProtocol300c;
 
  public:
 	void pad(int pad_amount);
--- PaintLineBW.h
+++ PaintLineBW.h	2005-10-05 11:50:40.000000000 +0200
@@ -33,7 +33,7 @@
 	int size;
 	int x,y;
 
-	friend LexmarkProtocolBW;
+	friend class LexmarkProtocolBW;
 	
  public:
 	void pad(int pad_amount);
--- Rect.h
+++ Rect.h	2005-10-05 11:51:24.000000000 +0200
@@ -23,8 +23,8 @@
 class Rect
 {
  public:
-	Rect::Rect();
-	Rect::Rect(int x, int y, int width, int height);
+	Rect();
+	Rect(int x, int y, int width, int height);
 	
 	int x,y,width,height;
 
--- SpongeWriter.h
+++ SpongeWriter.h	2005-10-05 11:50:40.000000000 +0200
@@ -44,7 +44,7 @@
 	
  public:
 	SpongeWriter(int maxSize, int fd);
-	~SpongeWriter();
+	virtual ~SpongeWriter();
 	
 	void write(char *data, int length);
 };
--- Writer.h
+++ Writer.h	2005-10-05 11:50:40.000000000 +0200
@@ -26,6 +26,7 @@
 {
  public:
 	virtual void write(char *data, int length) = 0;
+	virtual ~Writer() {}
 };
 
 #endif
--- main.cc
+++ main.cc	2005-10-05 11:50:40.000000000 +0200
@@ -86,7 +86,7 @@
 void print(FILE *fd,SpongeWriter *sp,bool blackwhite, int brightness)
 {
 	Reader r(fd,false);
-	char buffer[255];
+//	char buffer[255];
 	
 	PPMRawAlg alg(&r, true);
 	Map m(alg.width,alg.height,sizeof(RGB));
openSUSE Build Service is sponsored by