comments updated
[henge/apc.git] / src / scanner.c
index d01be15..0b733c8 100644 (file)
@@ -25,7 +25,6 @@
 #include "parser.tab.h"
 /* Public */
 void  scanner_quit(void);
-int   scanner_scanpath(char const*);
 int   scanner_scandir(DIR*);
 /* Private */
 static
@@ -40,22 +39,6 @@ extern //lexer.rl
 int   lexer_lexdir(uint8_t*);
 extern //lexer.rl
 void  lexer_closedir(void);
-/* Scan the provided path
-   Changes working directory to the provided pathname and, if successful, sends
-   a directory stream of the provided path to scanner_scandir
-*/
-int scanner_scanpath
-( char const* pathname )
-{ DIR* dirp;
-  errno = 0;
-  if ((dirp = opendir(pathname)) == NULL || errno)
-    { fprintf(stderr, "Path %s could not be accessed\n", pathname);
-      return -1;
-    }
-  if (chdir(pathname))
-    return -1;
-  return scanner_scandir(dirp);
-}
 
 /* Scan directory stream
    Recursively scans the provided directory, sending CLOPEN and CLCLOSE tokens