X-Git-Url: https://git.kengrimes.com/?p=henge%2Fapc.git;a=blobdiff_plain;f=src%2Fscanner.c;h=0b733c8390a6bf6d4329ef3cb690a481226b6613;hp=d01be156a96d2812beeaef6ab635c0a8501bb109;hb=e4ad1c1a9499babb6804823e60377a14b6a0b583;hpb=32084db924eb07c8a5e44748aaf12883189b37d2 diff --git a/src/scanner.c b/src/scanner.c index d01be15..0b733c8 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -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