//--------------------------------------------------------------------------- // 現在のインデックスを得る int __fastcall TACalResDlg::GetCurIndex(void) { double dnow[AVMAX]; int i, j; for( i = 0; i < pACal->amax; i++ ){ dnow[i] = RoundUpStr(pACal->GetNowValue(i)); } MVAL *mp = mval; for( i = 0; i < mmax; i++, mp++ ){ for( j = 0; j < pACal->amax; j++ ){ if( dnow[j] != RoundUpStr(mp->AD[j]) ) break; } if( j >= pACal->amax ) return i; } #if 0 FILE *fp; fp = fopen("e:\\Test.Txt", "wt"); for( i = 0; i < pACal->amax; i++ ){ fprintf(fp, "%10f ", dnow[i]); } fprintf(fp, "\n"); mp = mval; for( i = 0; i < mmax; i++, mp++ ){ for( j = 0; j < pACal->amax; j++ ){ fprintf(fp, "%10f ", float(mp->AD[j])); } fprintf( fp, "\n"); } fclose(fp); WarningMB("最適化シートと現在のアンテナ定義が一致しません.\r\n\r\n更新ボタンを押すと最適化シートの内容が優先されます."); #endif return 0; }
/*#$% ====================================================== DXCC定義ファイルを読み込む ------------------------------------------------------ fm : ファイル名のポインタ ------------------------------------------------------ ------------------------------------------------------ ====================================================== */ void CCountry::Load(LPCSTR fm) { FILE *fp; LPCSTR p; char hbf[512]; Free(); if( (fp = fopen(fm, "rt"))!=NULL ){ while( !feof(fp) ){ if( fgets(hbf, 512, fp)!=NULL ){ if( hbf[0] == '$' ) break; ClipLF(hbf); _delchr(hbf, TAB); if( hbf[0] != '!' ){ p = StrDlmCpy(wbf, hbf, ';', 512); clipsp(wbf); ctl[cmax].Name = StrDupe(wbf); if( p != NULL ){ p = StrDlmCpy(wbf, p, ';', 512); clipsp(wbf); ctl[cmax].Code = StrDupe(wbf); } if( p != NULL ){ p = StrDlmCpy(wbf, p, ';', 512); clipsp(wbf); ctl[cmax].QTH = StrDupe(wbf); } if( p != NULL ){ p = StrDlmCpy(wbf, p, ';', 512); clipsp(wbf); ctl[cmax].Cont = StrDupe(wbf); } if( p != NULL ){ StrDlmCpy(wbf, p, ';', 512); clipsp(wbf); ctl[cmax].TD = StrDupe(wbf); } cmax++; if( cmax >= CTMAX ) break; } } } fclose(fp); } else { WarningMB((sys.m_WinFontCharset != SHIFTJIS_CHARSET ) ? "'ARRL.DX' was not found.\r\n\r\nYou cannot use a DXCC function.\r\nThis is not a problem if you do not need it":"'ARRL.DX'が見つかりません.\r\n\r\nDXエンティティの自動判定機能は使用できません."); } }
//--------------------------------------------------------------------------- void __fastcall TLogListDlg::KFindBottomClick(TObject *Sender) { if( m_FindCall.IsEmpty() || (Sender == KFindBottom) ){ AnsiString as = m_FindCall; if( InputMB(NULL, sys.m_MsgEng ? "Callsign":"検索するコールサイン", as) == FALSE ) return; jstrupr(as.c_str()); m_FindCall = as; } int n = Log.Find(m_FindCall.c_str(), Grid->Row - 2, 1); if( n >= 0 ){ Grid->Row = n + 1; } else { WarningMB(sys.m_MsgEng ? "'%s' was not found" : "'%s'は見つかりませんでした.", m_FindCall.c_str()); } }