Qualified :
a_token = "abcdefg";
block_to = "fg";
b_token = "fg";
// // // // // // int aToken::block_to( char* block_to, int *index , int file_end, FILE *fp) { char dummy[256]; aToken *iToken = nullptr; char *parse_token; iToken = new aToken(); int ii = *index; char *b_token = nullptr; char *a_token = nullptr; int counter = 0; a_token = char_string(1); a_token[0] = (char)'\0'; int acnt = array_count(block_to); printf("block to: %s\r\n", block_to); for( ii=*index; iiblock = substring( a_token, 0, counter - acnt); this->block = a_token; printf("block_to ends: ii %d raw %d line %d block |%s| array_count=%d\r\n", ii, iToken->getRaw(), iToken->getLine(), this->block, array_count(a_token) ); *index = ii; return 1; } } *index = ii; printf( "return -1 index %d \r\n", *index ); exit(-1); return -1; }
parse function: substring: NEEDSDIR /* for stat() */ ii: 1902 file_end: 48005 counter: 41 acnt: 1 a_token: | NEEDSDIR /* for stat() */| b_token: |/| block_to: | | function: m_compare:start function: array_count: start function: array_count: end of m_fread: 1 fread: 1 end of m_fread: 1 start function: m_concat: start function: array_count: start function: array_count: array_count: 41 1 | NEEDSDIR /* for stat() */ function m_concat: i 0 parse function: substring: NEEDSDIR /* for stat() */ ii: 1903 file_end: 48005 counter: 42 acnt: 1 a_token: | NEEDSDIR /* for stat() */ | b_token: | | block_to: | | function: m_compare:start function: array_count: start function: array_count: start function: array_count: block_to ends: ii 1903 raw 0 line 1 block | NEEDSDIR /* for stat() */ | array_count=42 a_token: NEEDSDIR /* for stat() */