We cound not move err_msg or error. We don't touch any other functions and they well know how people mistake.
I suppose, err_msg does work.
// // // // // 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; level_error_msg = 3; set_level_error_msg = 3; for( int i=0; igetToken( fp, &i, &file_end ); if ( m_compare( (char*) "#define", parse_token ) == 1 ) { iToken->block_to( (char*)"\n", &i, file_end, fp); a_token = iToken->block; err_msg( "#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( "#include a_token: |%s|\r\n", a_token ); inc_count++; } else { err_msg( "else: parse_token: |%s| a_token: |%s|\r\n", parse_token, a_token ); err_msg("Exit(-1): Analyzer::parse: %s\r\n", filename); 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); return 1; }
g i: 2994 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=s end of put_token: token: s start of found_first_literals: s g000 i: 0 end of m_fread: 1 fread: 1 end of m_fread: 1 start of put_token: m_size=256 m_cnt_tkn=1 put_token:token=su end of put_token: g000 token=su function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: 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=2 put_token:token=suc end of put_token: g000 token=suc function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: 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=3 put_token:token=such end of put_token: g000 token=such function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: end of found_first_literals: 0 found 0 g i: 2995 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=such end of put_token: token: such start of found_first_literals: such g000 i: 0 end of m_fread: 1 fread: 1 end of m_fread: 1 start of put_token: m_size=256 m_cnt_tkn=5 put_token:token=such a end of put_token: g000 token=such a function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: 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=6 put_token:token=such as end of put_token: g000 token=such as function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: 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=7 put_token:token=such as end of put_token: g000 token=such as end of found_first_literals: 0 found 0 g i: 2996 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=i end of put_token: token: i start of found_first_literals: i g000 i: 0 end of m_fread: 1 fread: 1 end of m_fread: 1 start of put_token: m_size=256 m_cnt_tkn=1 put_token:token=it end of put_token: g000 token=it function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: 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=2 put_token:token=it end of put_token: g000 token=it 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=i end of put_token: g000 token=i function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: end of found_first_literals: 0 found 0 g i: 2997 end of m_fread: 1 fread: 1 end of m_fread: 1 start of put_token: m_size=256 m_cnt_tkn=1 put_token:token=is end of put_token: token: is start of found_first_literals: is g000 i: 0 end of m_fread: 1 fread: 1 end of m_fread: 1 start of put_token: m_size=256 m_cnt_tkn=2 put_token:token=is, end of put_token: g000 token=is, function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: 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=3 put_token:token=is, end of put_token: g000 token=is, 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=a end of put_token: g000 token=a function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: end of found_first_literals: 0 found 0 g i: 2998 end of m_fread: 1 fread: 1 end of m_fread: 1 start of put_token: m_size=256 m_cnt_tkn=1 put_token:token=an end of put_token: token: an start of found_first_literals: an g000 i: 0 end of m_fread: 1 fread: 1 end of m_fread: 1 start of put_token: m_size=256 m_cnt_tkn=2 put_token:token=and end of put_token: g000 token=and function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: 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=3 put_token:token=and end of put_token: g000 token=and 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=p end of put_token: g000 token=p function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: end of found_first_literals: 0 found 0 g i: 2999 end of m_fread: 1 fread: 1 end of m_fread: 1 start of put_token: m_size=256 m_cnt_tkn=1 put_token:token=pu end of put_token: token: pu start of found_first_literals: pu g000 i: 0 end of m_fread: 1 fread: 1 end of m_fread: 1 start of put_token: m_size=256 m_cnt_tkn=2 put_token:token=put end of put_token: g000 token=put function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: 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=3 put_token:token=puts end of put_token: g000 token=puts function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: 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=4 put_token:token=puts end of put_token: g000 token=puts end of found_first_literals: 0 found 0 end of aToken::getToken return || found 0 function: m_compare:start function: array_count: start function: array_count: function: m_compare:start function: array_count: start function: array_count: