about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-01-19 02:41:20 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-01-19 02:41:20 +0000
commit79d7f8c86667c21fadb51ace724b967bb1bced7a (patch)
treed2962e5cf40afd684d0c03318fddba809bd48ec4
parente6a1ebb7c6eb226c28e813f0889c290533e0a8a2 (diff)
downloadnetpbm-mirror-79d7f8c86667c21fadb51ace724b967bb1bced7a.tar.gz
netpbm-mirror-79d7f8c86667c21fadb51ace724b967bb1bced7a.tar.xz
netpbm-mirror-79d7f8c86667c21fadb51ace724b967bb1bced7a.zip
Add comments
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2387 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/pgm/sbigtopgm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/converter/pgm/sbigtopgm.c b/converter/pgm/sbigtopgm.c
index 883e3396..43cc08d9 100644
--- a/converter/pgm/sbigtopgm.c
+++ b/converter/pgm/sbigtopgm.c
@@ -86,6 +86,13 @@ looseCanon(char * const cpArg) {
 /*----------------------------------------------------------------------------
   Canonicalize a line from the file header so items more sloppily formatted
   than those written by CCDOPS are still accepted.
+
+  Remove all whitespace and make all letters lowercase.
+
+  Note that the SBIG Type 3 format specification at www.sbig.com in January
+  2015 says header parameter names are capitalized like 'Height' and the line
+  ends with CRLF.  In such a case, we change the first letter to 'h' and
+  remove the CR.
 -----------------------------------------------------------------------------*/
     char * cp;
     char * op;
@@ -189,6 +196,8 @@ readSbigHeader(FILE *              const ifP,
             }
         }
         looseCanon(cursor);
+            /* Convert from standard SBIG to an internal format */
+
         if (strneq(cursor, "ST-", 3)) {
             sbigHeaderP->isCompressed = (strstr("compressed", cursor) != NULL);
             gotCompression = true;