From 79d7f8c86667c21fadb51ace724b967bb1bced7a Mon Sep 17 00:00:00 2001 From: giraffedata Date: Mon, 19 Jan 2015 02:41:20 +0000 Subject: Add comments git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2387 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/pgm/sbigtopgm.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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; -- cgit 1.4.1