#include <dirent.h>
/* Local */
+#include "apc.h"
#include "parser.tab.h"
#ifndef DE_STACKSIZE
#define DE_STACKSIZE 1024
int scanner_init(void);
extern //scanner.c
int scanner(void);
-static inline
-int dredge_current_depth(void);
extern //bison
YYSTYPE yylval;
static
start:
while (DE_LEN() > 0)//lex any directory entries in our stack
{
- if (lexer_lexfile(DE_POP()->d_name) == 0)
+ if (lexer_lexfile((uint8_t*)DE_POP()->d_name) == 0)
FAIL("Lexer failed to tokenize [%s]\n",(*DE_STACKB)->d_name);
}
if (TK_EMPTY) //if there are no tokens,
{ static uint8_t current_path[FPATH_MAX];
static uint8_t const* last_filename;
if ((!last_filename || last_filename != current_filename) &&
- ((uint8_t*) realpath(current_filename, current_path) != (uint8_t*) current_path))
+ ((uint8_t*) realpath((char*)current_filename, (char*)current_path) != (uint8_t*) current_path))
{ perror("realpath: ");
return NULL;
}
/* Determine the filetype of str */
len = u8_strlen(str);
- ntok += lexer_lexstring(str, len);
+ ntok = lexer_lexstring(str, len);
/* Pass back filepath as end of statment operator */
filepath = u8_strdup(lexer_get_current_filepath());