From cc4724ed8e52fd6de475f869c5e65ba0d9c82f03 Mon Sep 17 00:00:00 2001 From: ken Date: Thu, 3 Nov 2016 20:05:39 -0700 Subject: [PATCH] back to char* for lexer_lexstring --- src/apc/scanner.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/apc/scanner.c b/src/apc/scanner.c index 07f18ce..5611c95 100644 --- a/src/apc/scanner.c +++ b/src/apc/scanner.c @@ -31,7 +31,7 @@ int scanner(void); int scanner_scanpixels(int*,int); /* Private */ extern //lexer.c -int lexer_lexstring(const ucs4_t*); +int lexer_lexstring(const char*); extern //lexer.c void lexer_pushtok(int, int); static @@ -127,11 +127,6 @@ void scanner_quit */ int scanner #define $($)#$ //stringifier -#ifdef _DIRENT_HAVE_D_NAMLEN -#define MAX_DNAME _D_ALLOC_NAMLEN(DL_CD()) -#else -#define MAX_DNAME 1024 -#endif #define ERR_CHILD "Fatal: Maximum of " $(DL_CD_STACKSIZE) \ " child directories exceeded for directory at depth %i\n" \ ,DL_LEN() @@ -139,8 +134,7 @@ int scanner " exceeded during directory scan\n" #define ERR_DL "Fatal: Directory List Stack Corruption %x\n", DL_LEN() () -{ static ucs4_t uc_dname[MAX_DNAME] = {0}; - int ntok = 0; +{ int ntok = 0; scan: if (DL_CD_LEN() >= DL_CD_STACKSIZE)//fail if maxchildren exceeded { fprintf(stderr, ERR_CHILD); @@ -149,9 +143,7 @@ int scanner if (DL_CD_LEN() > 0) //There are entities to process { if (DL_CD_POP() == NULL) //If the dirent is null, then the goto libfail; //lib function in dirent has failed - if (u8_mbtouc(uc_dname, DL_CD_CURNAME(), MAX_DNAME) < 0) //convert to ucs4 - goto libfail; - ntok += lexer_lexstring(uc_dname); //lex the directory name + ntok += lexer_lexstring(DL_CD_CURNAME());//lex the directory name if (DL_LEN() >= DL_STACKSIZE) //fail if maxdepth exceeded { fprintf(stderr, ERR_DEPTH); goto fail; -- 2.18.0