~ubuntu-branches/ubuntu/trusty/digikam/trusty

« back to all changes in this revision

Viewing changes to extra/libkdcraw/libraw/samples/dcraw_emu.cpp

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-11-26 18:24:20 UTC
  • mfrom: (1.9.1) (3.1.23 experimental)
  • Revision ID: package-import@ubuntu.com-20121126182420-qoy6z0nx4ai0wzcl
Tags: 4:3.0.0~beta3-0ubuntu1
* New upstream release
  - Add build-deps :  libhupnp-dev, libqtgstreamer-dev, libmagickcore-dev
* Merge from debian, remaining changes:
  - Make sure libqt4-opengl-dev, libgl1-mesa-dev and libglu1-mesa-dev only
    install on i386,amd64 and powerpc
  - Depend on libtiff-dev instead of libtiff4-dev
  - Drop digikam breaks/replaces kipi-plugins-common since we're past the
    LTS release now
  - digikam to recommend mplayerthumbs | ffmpegthumbs. We currently only
    have latter in the archives, even though former is also supposed to
    be part of kdemultimedia. (LP: #890059)
  - kipi-plugins to recommend www-browser rather than konqueror directly
    since 2.8 no direct usage of konqueror is present in the flickr
    plugin anymore (LP: #1011211)
  - Keep kubuntu_mysqld_executable_name.diff
  - Don't install libkipi translations
  - Keep deps on libcv-dev, libcvaux-dev
  - Keep split packaging of libraries
  - Replace icons from KDE 3 time in debian/xpm.d/*.xpm with the new
    versions (LP: #658047)
* Update debian/not-installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
"-agreen <g> equilibrate green\n"
114
114
#endif
115
115
"-aexpo <e p> exposure correction\n"
 
116
// WF
 
117
"-dbnd <r g b g> debanding\n"
116
118
#ifndef WIN32
117
119
"-mmap     Use mmap()-ed buffer instead of plain FILE I/O\n"
118
120
#endif
119
121
"-mem      Use memory buffer instead of FILE I/O\n"
120
 
        );
 
122
"-disars   Do not use RawSpeed library\n"
 
123
);
121
124
    exit(1);
122
125
}
123
126
 
197
200
          char *optstr = argv[arg];
198
201
          opt = argv[arg++][1];
199
202
          if ((cp = strchr (sp=(char*)"cnbrkStqmHABCgU", opt))!=0)
200
 
              for (i=0; i < "111411111142"[cp-sp]-'0'; i++)
 
203
              for (i=0; i < "111411111144221"[cp-sp]-'0'; i++)
201
204
                  if (!isdigit(argv[arg+i][0]) && !optstr[2]) 
202
205
                      {
203
206
                          fprintf (stderr,"Non-numeric argument to \"-%c\"\n", opt);
332
335
              case 'd':
333
336
                  if(!strcmp(optstr,"-dcbi"))
334
337
                      OUT.dcb_iterations = atoi(argv[arg++]);
 
338
                                  else if(!strcmp(optstr,"-disars"))
 
339
                                          OUT.use_rawspeed=0;
335
340
                  else if(!strcmp(optstr,"-dcbe"))
336
341
                      OUT.dcb_enhance_fl = 1;
 
342
                  else if(!strcmp(optstr,"-dbnd"))
 
343
                  {
 
344
                        for(c=0; c<4; c++)
 
345
                            OUT.wf_deband_treshold[c] = (float)atof(argv[arg++]);
 
346
                                        OUT.wf_debanding = 1;
 
347
                  }
337
348
                  else
338
349
                      fprintf (stderr,"Unknown option \"%s\".\n",argv[arg-1]);
339
350
                  break;
430
441
                        }
431
442
                                        if(!(iobuffer = malloc(st.st_size)))
432
443
                                        {
433
 
                                                fprintf(stderr,"Cannot allocate %d kbytes for memory buffer\n",st.st_size/1024);
 
444
                                          fprintf(stderr,"Cannot allocate %d kbytes for memory buffer\n",(int)(st.st_size/1024));
434
445
                                                close(file);
435
446
                                                continue;
436
447
                                        }
437
448
                                        int rd;
438
449
                                        if(st.st_size!=(rd=read(file,iobuffer,st.st_size)))
439
450
                                        {
440
 
                                                fprintf(stderr,"Cannot read %d bytes instead of  %d to memory buffer\n",rd,st.st_size);
 
451
                                          fprintf(stderr,"Cannot read %d bytes instead of  %d to memory buffer\n",(int)rd,(int)st.st_size);
441
452
                                                close(file);
442
453
                                                free(iobuffer);
443
454
                                                continue;