~ubuntu-branches/ubuntu/utopic/dcraw/utopic-proposed

« back to all changes in this revision

Viewing changes to parse.c

  • Committer: Package Import Robot
  • Author(s): Andreas Metzler
  • Date: 2014-06-19 07:52:40 UTC
  • mfrom: (15.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20140619075240-d83jmkst62z30i9h
Tags: 9.21-0.2
* Non-maintainer upload.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
   Raw Photo Parser
3
 
   Copyright 2004-2010 by Dave Coffin, dcoffin a cybercom o net
 
3
   Copyright 2004-2014 by Dave Coffin, dcoffin a cybercom o net
4
4
 
5
5
   This program displays raw metadata for all raw photo formats.
6
6
   It is free for all uses.
7
7
 
8
 
   $Revision: 1.74 $
9
 
   $Date: 2012/01/24 07:15:43 $
 
8
   $Revision: 1.75 $
 
9
   $Date: 2014/01/14 20:40:01 $
10
10
 */
11
11
 
12
12
#include <stdio.h>
254
254
    val = get2();               /* should be 42 decimal */
255
255
    offset = get4();
256
256
    fseek (ifp, offset-8, SEEK_CUR);
257
 
  } else if (!strcmp (buf,"OLYMPUS")) {
 
257
  } else if (!strcmp (buf,"OLYMPUS") ||
 
258
             !strcmp (buf,"PENTAX ")) {
258
259
    base = ftell(ifp)-10;
259
260
    fseek (ifp, -2, SEEK_CUR);
260
 
    order = get2();  get2();
 
261
    order = get2();
 
262
    if (buf[0] == 'O') get2();
261
263
  } else if (!strncmp (buf,"SONY",4) ||
262
264
             !strcmp  (buf,"Panasonic")) {
263
265
    goto nf;
369
371
    for (p=0; p < 127; p++)
370
372
      pad[p] = htonl(pad[p]);
371
373
  }
372
 
  while (len--)
373
 
    *data++ ^= pad[p++ & 127] = pad[(p+1) & 127] ^ pad[(p+65) & 127];
 
374
  while (len-- && p++)
 
375
    *data++ ^= pad[(p-1) & 127] = pad[p & 127] ^ pad[(p+64) & 127];
374
376
}
375
377
 
376
378
int parse_tiff_ifd (int base, int level)