it finished well.
fread: 1 end of m_fread: 1 start of put_token: m_size=256 m_cnt_tkn=3 put_token:token=byte end of put_token: g000 token=byte g000 i: 1 end of m_fread: 1 fread: 1 end of m_fread: 1 start of put_token: m_size=256 m_cnt_tkn=4 put_token:token=byte end of put_token: g000 token=byte g000 i: 2 end of m_fread: 1 fread: 1 end of m_fread: 1 start of put_token: m_size=256 m_cnt_tkn=0 put_token:token=* end of put_token: g000 token=* end of found_first_literals: 0 found 0 end of aToken::getToken return |*| found 0 Analyzer::getToken ends. else: parse_token: |*| a_token: |doPaste(cimg) | Exit(-1): Analyzer::parse: .\xvcut.c i: 2999 / 3000 ---- // // // // // int Analyzer::parse ( char* filename ) { FILE *fp; aToken *iToken = nullptr; char *parse_token; int previous_index = 0; char dummy[256]; char* a_token; int mode_token = 0; iToken = new aToken(); fp = fopen ( filename, "rb" ); int file_end = filesize ( fp ); int anz_count = 0; int inc_count = 0; Sleep(1000); level_error_msg = 2; set_level_error_msg = 3; // printf ("Analyzer::parse: starts.\r\n"); err_msg_006 ("Analyzer::parse: starts.\r\n"); for( int i=0; igetToken( fp, &i, &file_end ); err_msg_006 ("Analyzer::getToken ends.\r\n"); if ( m_compare( (char*) "#define", parse_token ) == 1 ) { iToken->block_to( (char*)"\n", &i, file_end, fp); a_token = iToken->block; err_msg_006( "#define a_token: |%s|\r\n", a_token ); // 20190923 printed and qualified. // dummy[0] = iToken->getChar( fp, &i, &file_end); // dummy[1] = '\0'; // printf("#define next: i:%d dummy: |%s|\r\n", i, dummy ); // exit(-1); // end of m_fread: 1 // #define next: i:1903 dummy: |#| anz_count++; } else if ( m_compare( (char*) "#include", parse_token ) == 1 ) { iToken->block_to( (char*)"\n", &i, file_end, fp); a_token = iToken->block; err_msg_006( "#include a_token: |%s|\r\n", a_token ); inc_count++; } else if ( is_function_start( parse_token ) == 1 ) { err_msg_006( "is_function_start: parse_token: |%s| a_token: |%s|\r\n", parse_token, a_token ); iToken->block_to_function_end( &i, file_end, fp ); a_token = iToken->block; err_msg_006("memorization 000: index %d max %d \r\n", index_wc, max_index_wc); if ( array_wC_structure == nullptr ) { max_index_wc = 10; index_wc = 0; array_wC_structure = (wC_structure**) malloc ( sizeof(wC_structure*) * max_index_wc ); } err_msg_006("memorization001: index %d max %d \r\n", index_wc, max_index_wc); array_wC_structure[index_wc] = new wC_structure(); array_wC_structure[index_wc]->function_name = a_token; index_wc++; err_msg_006("memorization 002: index %d max %d \r\n", index_wc, max_index_wc); //err_msg_006("Exit(-1): Analyzer::parse: %s\r\n", filename); //exit(-1); } else { err_msg_006( "else: parse_token: |%s| a_token: |%s|\r\n", parse_token, a_token ); err_msg_006("Exit(-1): Analyzer::parse: %s i: %d / %d \r\n", filename, i, PARSE_NUM); exit(-1); } iToken->free_main_token (); if ( inc_count == 6 ) break; // if ( anz_count == 3 ) break; switch( mode_token ) { case 0: break; case 1: break; } } fclose(fp); err_msg_006("Analyzer::parse: ends.\r\n"); return 1; }