libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit 8cbbbee279b2326c882434f1214520a913ba121e
parent 05679b1251dc1707c52ae241860ec16022f839d3
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 25 Sep 2005 18:20:31 +0000

return value 1 on error

Diffstat:
Msrc/main/extract.c | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/main/extract.c b/src/main/extract.c @@ -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 @@ main (int argc, char *argv[]) int duplicates = EXTRACTOR_DUPLICATES_REMOVE_UNKNOWN; int bibtex = NO; char * binary = NULL; + int ret = 0; #ifdef MINGW InitWinEnv(); @@ -599,6 +600,10 @@ main (int argc, char *argv[]) _("%% 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 @@ main (int argc, char *argv[]) ShutdownWinEnv(); #endif - return 0; + return ret; }