jbig2dec

Ralph Giles <[email protected]> Wed, 14 Aug 2002 04:44:56 -0700
Newsgroups gmane.comp.printing.ghostscript.jbig2dec.cvs
Message-ID <[email protected]>
Update of /cvsroot/jbig2dec/jbig2dec
In directory usw-pr-cvs1:/tmp/cvs-serv30396

Modified Files:
	jbig2_image_pbm.c 
Log Message:
Remove //-style comments.


Index: jbig2_image_pbm.c
===================================================================
RCS file: /cvsroot/jbig2dec/jbig2dec/jbig2_image_pbm.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- jbig2_image_pbm.c	20 Jul 2002 17:23:15 -0000	1.10
+++ jbig2_image_pbm.c	14 Aug 2002 11:44:53 -0000	1.11
@@ -44,12 +44,12 @@
 
 int jbig2_image_write_pbm(Jbig2Image *image, FILE *out)
 {
-        // pbm header
+        /* pbm header */
         fprintf(out, "P4\n%d %d\n", image->width, image->height);
         
-        // pbm format pads to a byte boundary, so we can
-        // just write out the whole data buffer
-        // NB: this assumes minimal stride for the width
+        /* pbm format pads to a byte boundary, so we can
+           just write out the whole data buffer
+           NB: this assumes minimal stride for the width */
         fwrite(image->data, 1, image->height*image->stride, out);
         
         /* success */
@@ -81,7 +81,7 @@
     int c;
     char buf[32];
     
-    // look for 'P4' magic
+    /* look for 'P4' magic */
     while ((c = fgetc(in)) != 'P') {
         if (feof(in)) return NULL;
     }
@@ -89,17 +89,17 @@
         fprintf(stderr, "not a binary pbm file.\n");
         return NULL;
     }
-    // read size. we must find two decimal numbers representing
-    // the image dimensions. done will index whether we're
-    // looking for the width of the height and i will be our
-    // array index for copying strings into our buffer
+    /* read size. we must find two decimal numbers representing
+       the image dimensions. done will index whether we're
+       looking for the width of the height and i will be our
+       array index for copying strings into our buffer */
     done = 0;
     i = 0;
     while (done < 2) {
         c = fgetc(in);
-        // skip whitespace
+        /* skip whitespace */
         if (c == ' ' || c == '\t' || c == '\r' || c == '\n') continue;
-        // skip comments
+        /* skip comments */
         if (c == '#') {
             while ((c = fgetc(in)) != '\n');
             continue;
@@ -118,20 +118,20 @@
             done++;
         }
     }
-    // allocate image structure
+    /* allocate image structure */
     image = jbig2_image_new(ctx, dim[0], dim[1]);
     if (image == NULL) {
         fprintf(stderr, "could not allocate %dx%d image for pbm file\n", dim[0], dim[1]);
         return NULL;
     }
-    // the pbm data is byte-aligned, so we can
-    // do a simple block read
+    /* the pbm data is byte-aligned, so we can
+       do a simple block read */
     fread(image->data, 1, image->height*image->stride, in);
     if (feof(in)) {
         fprintf(stderr, "unexpected end of pbm file.\n");
         jbig2_image_free(ctx, image);
         return NULL;
     }    
-    // success
+    /* success */
     return image;
 }