Commit 766b0df0 authored by Gert Wollny's avatar Gert Wollny
Browse files

New upstream version 2.8.9

parent fa93f977
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -51,15 +51,15 @@ static bool AnonymizeOneFileDumb(gdcm::Anonymizer &anon, const char *filename, c
  reader.SetFileName( filename );
  if( !reader.Read() )
    {
    std::cerr << "Could not read : " << filename << std::endl;
    std::cerr << "Could not read : " << filename;
    if( continuemode )
      {
      std::cerr << "Skipping from anonymization process (continue mode)." << std::endl;
      std::cerr << " -> Skipping from anonymization process (continue mode)." << std::endl;
      return true;
      }
    else
      {
      std::cerr << "Check [--continue] option for skipping files." << std::endl;
      std::cerr << " -> Check [--continue] option for skipping files." << std::endl;
      return false;
      }
    }
@@ -611,7 +611,7 @@ int main(int argc, char *argv[])
    crypto_factory = gdcm::CryptoFactory::GetFactoryInstance(crypto_lib);
    if (!crypto_factory)
      {
      std::cerr << "Requested cryptoraphic library not configured." << std::endl;
      std::cerr << "Requested cryptographic library not configured." << std::endl;
      return 1;
      }
    }
+6 −0
Original line number Diff line number Diff line
@@ -70,8 +70,12 @@
#include <getopt.h>
#include <string.h>

#ifndef GDCM_HAVE_ATOLL
#ifdef _MSC_VER
#define atoll _atoi64
#else
#define atoll atol
#endif
#endif

static unsigned int readsize(const char *str, unsigned int * size)
@@ -967,6 +971,7 @@ int main (int argc, char *argv[])

    if(  gdcm::System::StrCaseCmp(inputextension,".pgm") == 0
      || gdcm::System::StrCaseCmp(inputextension,".pnm") == 0
      || gdcm::System::StrCaseCmp(inputextension,".pbm") == 0
      || gdcm::System::StrCaseCmp(inputextension,".ppm") == 0 )
      {
      gdcm::PNMCodec pnm;
@@ -1114,6 +1119,7 @@ int main (int argc, char *argv[])
    {
    if(  gdcm::System::StrCaseCmp(outputextension,".pgm") == 0
      || gdcm::System::StrCaseCmp(outputextension,".pnm") == 0
      || gdcm::System::StrCaseCmp(outputextension,".pbm") == 0
      || gdcm::System::StrCaseCmp(outputextension,".ppm") == 0 )
      {
      gdcm::PNMCodec pnm;
+7 −7
Original line number Diff line number Diff line
@@ -258,7 +258,7 @@ static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uM
{
  Object obj;
  const GooString *s1;
  GBool isUnicode;
  bool isUnicode;
  Unicode u;
  char buf[8];
  int i, n;
@@ -274,12 +274,12 @@ static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uM
    if ((s1->getChar(0) & 0xff) == 0xfe &&
      (s1->getChar(1) & 0xff) == 0xff)
      {
      isUnicode = gTrue;
      isUnicode = true;
      i = 2;
      }
    else
      {
      isUnicode = gFalse;
      isUnicode = false;
      i = 0;
      }
    while (i < obj.getString()->getLength())
@@ -539,10 +539,10 @@ static int ProcessOneFile( std::string const & filename, gdcm::Defs const & defs
      int pages = doc->getNumPages();
      const char *encrypted = doc->isEncrypted() ? "yes" : "no";
      //  printf("yes (print:%s copy:%s change:%s addNotes:%s)\n",
      //   doc->okToPrint(gTrue) ? "yes" : "no",
      //   doc->okToCopy(gTrue) ? "yes" : "no",
      //   doc->okToChange(gTrue) ? "yes" : "no",
      //   doc->okToAddNotes(gTrue) ? "yes" : "no");
      //   doc->okToPrint(true) ? "yes" : "no",
      //   doc->okToCopy(true) ? "yes" : "no",
      //   doc->okToChange(true) ? "yes" : "no",
      //   doc->okToAddNotes(true) ? "yes" : "no");

      // print linearization info
      const char *optimized = doc->isLinearized() ? "yes" : "no";
+5 −5
Original line number Diff line number Diff line
@@ -102,11 +102,11 @@ static std::string getInfoDate(Dict *infoDict, const char *key)
  return out;
}

static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uMap, GBool & unicode)
static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uMap, bool & unicode)
{
  Object obj;
  const GooString *s1;
  GBool isUnicode = gFalse;
  bool isUnicode = false;
  Unicode u;
  char buf[8];
  int i, n;
@@ -122,12 +122,12 @@ static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uM
    if ((s1->getChar(0) & 0xff) == 0xfe &&
      (s1->getChar(1) & 0xff) == 0xff)
      {
      isUnicode = gTrue;
      isUnicode = true;
      i = 2;
      }
    else
      {
      isUnicode = gFalse;
      isUnicode = false;
      i = 0;
      }
    while (i < obj.getString()->getLength())
@@ -398,7 +398,7 @@ http://msdn.microsoft.com/en-us/library/078sfkak(VS.80).aspx
  std::string creationdate;
  std::string moddate;

  GBool isUnicode = gFalse;
  bool isUnicode = false;
  if (doc->isOk())
    {
#ifdef LIBPOPPLER_NEW_OBJECT_API
+3 −3
Original line number Diff line number Diff line
@@ -523,7 +523,7 @@ static int MakeImageEnhanced( std::string const & filename, std::string const &o
    // construct the target name:
    std::string targetname = targetdir;

    targetdir += "/old/";
    targetdir += "/old";

    // make sure the dir exist first:
    if( !gdcm::System::MakeDirectory( targetdir.c_str() ) )
@@ -779,10 +779,10 @@ static int MakeImageEnhanced( std::string const & filename, std::string const &o
  if( !unsorted.empty() )
    {
    std::string targetdir3 = outfilename;
    targetdir3 += "/unhandled/";
    targetdir3 += "/unhandled";
    if( !gdcm::System::MakeDirectory( targetdir3.c_str() ) )
      {
      std::cerr << "Could not create dir: " << outfilename << std::endl;
      std::cerr << "Could not create dir: " << targetdir3 << std::endl;
      return 1;
      }
    std::cerr << "Could not process the following files (please report): " << std::endl;
Loading