X-Git-Url: https://www.kengrimes.com/gitweb/?p=henge%2Fwebcc.git;a=blobdiff_plain;f=src%2Fapc%2Fscanner.c;h=b1b7998bfe7adf51a6885cd22d568c8f3f001d40;hp=07f18ce113effebd6c4414eee8d5bc83fa329f25;hb=301cac5f6e2edcecf2e1bd89aee5182130a213fc;hpb=0f505368fa8abbc2e9ab0296b9a5e6bd4869345f diff --git a/src/apc/scanner.c b/src/apc/scanner.c index 07f18ce..b1b7998 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 uint8_t*); extern //lexer.c void lexer_pushtok(int, int); static @@ -139,8 +139,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,16 +148,13 @@ 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; } if (chdir(DL_CD_CURNAME())) //move into the new directory goto libfail; - DL_PUSH(opendir(CWDSTR)); if (DL_CURDIR() == NULL) //open the cwd goto libfail; lexer_pushtok(CLOPEN, 0); //Push "Open Directory" token @@ -200,8 +196,8 @@ int scanner_scanpixels return -1; } //Verify file header, get row_len/col_len - if (read_img_header(&row_len, &col_len)) - return -1; + //if (read_img_header(&row_len, &col_len)) + //return -1; row = 0; } //Read pixels into the buffer if there are rows left in the image