File c2070-0.99.dif of Package filters

--- c2070.c
+++ c2070.c	2002/01/07 14:17:39
@@ -50,14 +50,14 @@
  */
 void ClearBuffer(char *data, int bytes)
 {
-  register i;
+  register int i;
   for(i = 0; i < bytes; data[i++] = 0);
 } /* ClearBuffer */
 
 /* 
  * Initialize a sweep buffer
  */
-SweepBuffer_Init (struct tSweepBuffer *SweepBuffer, int bytesize)
+void SweepBuffer_Init (struct tSweepBuffer *SweepBuffer, int bytesize)
 {
   SweepBuffer->bytepos = 0;
   SweepBuffer->bitpos = 0;
@@ -135,7 +135,7 @@
 {
   int bstart;
   int leftmargin = LEFT_MARGIN;
-  register i;
+  register int i;
   /* Remove zeros and set a margin instead. Faster Printing. */
   bstart = ReduceBytes(buffer, BYTES_PER_COLUMN, &leftmargin,
 		       &width, &bytesize);
@@ -165,7 +165,7 @@
  */
 int LineSum(char line[], int length)
 {
-  register i = 0;
+  register int i = 0;
   while (i < length)
     if(line[i++] != 0) return 1;
   return 0;
@@ -329,7 +329,7 @@
 		colbuffer[CurrentColBuffer + 3].unprinted;
 	      colbuffer[CurrentColBuffer + 3].unprinted = 0;
 	      /* switch to the next buffer */
-	      CurrentColBuffer = ++CurrentColBuffer % 3;
+	      CurrentColBuffer = (CurrentColBuffer + 1) % 3;
 	    }
 	  /* ...then finally black */
 	  if (!(cyancounter % BLACK_PENS) || (page_height >= GS_PAGE_HEIGHT))
@@ -378,5 +378,7 @@
 
   fclose(OutPutFile);
   fclose(InputFile);
+
+  return 0;
 }
     
--- makefile
+++ makefile	2002/01/07 14:16:56
@@ -8,8 +8,8 @@
 # Important compiler and linker options
 CC=gcc
 LD=gcc
-CFLAGS=
-LDFLAGS=
+CFLAGS=$(RPM_OPT_FLAGS) -Wall
+LDFLAGS=-s
 
 # Required libraries
 LDLIBS=
@@ -21,7 +21,7 @@
 
 # Standard production rule
 .c.o: 
-	$(CC) -c $< $(CFLAGS)
+	$(CC) $(CFLAGS) -c $<
 
 # make all
 all: c2070
@@ -39,7 +39,7 @@
 
 #install the driver
 install: all
-	cp c2070 /usr/bin
-	chmod a+x /usr/bin/c2070
+	mkdir -p $(DESTDIR)/usr/bin
+	install -m 0755 c2070 $(DESTDIR)/usr/bin/
 
 
openSUSE Build Service is sponsored by