gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r2143 - Extractor/src/main


From: grothoff
Subject: [GNUnet-SVN] r2143 - Extractor/src/main
Date: Sun, 25 Sep 2005 11:20:32 -0700 (PDT)

Author: grothoff
Date: 2005-09-25 11:20:31 -0700 (Sun, 25 Sep 2005)
New Revision: 2143

Modified:
   Extractor/src/main/extract.c
Log:
return value 1 on error

Modified: Extractor/src/main/extract.c
===================================================================
--- Extractor/src/main/extract.c        2005-09-25 09:12:15 UTC (rev 2142)
+++ Extractor/src/main/extract.c        2005-09-25 18:20:31 UTC (rev 2143)
@@ -1,6 +1,6 @@
 /*
      This file is part of libextractor.
-     (C) 2002, 2003, 2004 Vidyut Samanta and Christian Grothoff
+     (C) 2002, 2003, 2004, 2005 Vidyut Samanta and Christian Grothoff
 
      libextractor is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -391,6 +391,7 @@
   int duplicates = EXTRACTOR_DUPLICATES_REMOVE_UNKNOWN;
   int bibtex = NO;
   char * binary = NULL;
+  int ret = 0;
 
 #ifdef MINGW
   InitWinEnv();
@@ -599,6 +600,10 @@
            _("%% BiBTeX file\n"));
   for (i = optind; i < argc; i++)
     {
+      if (0 != ACCESS(argv[i], R_OK)) {
+       ret = 1;
+       continue;
+      }
       keywords = EXTRACTOR_getKeywords (extractors, argv[i]);
       if (duplicates != -1 || bibtex == YES)
        keywords = EXTRACTOR_removeDuplicateKeywords (keywords, duplicates);
@@ -619,5 +624,5 @@
   ShutdownWinEnv();
 #endif
 
-  return 0;
+  return ret;
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]