マクロ整数型を 64-bit に拡張 (int64型・uptime64コマンドを廃止)#1343
Draft
m-tmatma wants to merge 21 commits into
Draft
Conversation
49日でオーバーフローするGetTickCount()をGetTickCount64()に置き換え。 関連する変数の型をDWORDからULONGLONGに変更し、CheckTimeout()の DWORDオーバーフロー対策コードを削除して簡略化。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
`int64 varname` 構文で64ビット整数変数を宣言できるようにし、 `uptime` コマンドがTypInteger64変数に対して64ビット全体を格納するよう対応。 これにより OS 起動から 49.7 日以上経過した環境でも正確な経過時間計測が可能。 - ttmparse.h/cpp: TypInteger64型追加、式評価器をlong longに変更、 NewInt64Var/GetIntVal(int*)オーバーロード追加 - ttl.cpp: TTLInt64Decl追加、TTLUptime 64bit対応、ExecCmndにTypInteger64代入処理追加 - tests/wait_timeout.ttl: int64変数を使った経過時間テストを追加 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- GetIntVal/GetVarTypeのint*オーバーロードをextern"C"非互換のため削除 - GetIntVal実装をint*シグネチャに戻し、内部でlong longを使用してlong longに truncate - GetVarType実装をint*シグネチャに戻す - GetExpressionを直接呼ばないlong long Valローカル変数をint Valに戻す - TTLWait内のGetExpression呼び出し用Valをlong longに修正 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GetExpressionがlong long*を期待するため、GetStrVal2内のVarIdを long longに変更し、TypInteger64のstring変換も対応。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- uptime: 従来通り下位32ビットのみ格納(既存動作を維持) - uptime64: 新規コマンド。int64変数に64ビット全体を格納し、 OS起動から49.7日以上経過しても正確な時刻取得が可能 - wait_timeout.ttl: uptime → uptime64 に変更 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
wait_timeout.ttl と同じ構造で、uptime(32bit int版)が 3秒の pause で正確に経過時間を計測できることを確認する。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
テスト内容(uptime64コマンドの動作確認)に合わせてファイル名を変更。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32ビットを超える値($80000000, $100000000, 10000000000 等)を使い、 int64 の加減乗除・剰余・比較演算が正しく動作することを確認する。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Introduced new HTML documentation for the uptime64 command in both English and Japanese, detailing its usage and providing examples. - Updated the Tera Term Help Contents (HHC) files to include references to the new uptime64 command. - Added a test script for uptime64 to verify its functionality without requiring a connection. This enhances the usability and accessibility of the uptime64 command for users.
- Changed instances of 'uptime varend' to 'uptime64 varend' in both English and Japanese documentation files for consistency and accuracy. - This ensures that the documentation correctly reflects the usage of the uptime64 command.
- Added references for the new uptime64 command in both English and Japanese documentation files. - Updated the help ID file to include the new command's identifier, ensuring consistency across the project.
- Changed the title and header from 'uptime' to 'uptime64' in both English and Japanese HTML documentation files to accurately reflect the command's name. - This ensures consistency and clarity in the documentation for users.
- Modified the macro syntax in both English and Japanese HTML documentation files to reflect the correct usage of the uptime64 command, changing 'uptime <intvar>' to 'int64 var' and 'uptime64 <var>'. - This update enhances clarity and accuracy in the documentation for users.
…mentation - Changed 'int64 var' to 'int64 <var>' in both English and Japanese HTML documentation files to improve clarity and accuracy in the usage of the uptime64 command. - This update ensures that users have the correct syntax for the command.
- TypInteger の内部表現を int から long long に変更し、すべての 整数変数が宣言不要で64bitとして機能するようにした - TypInteger64 型・NewInt64Var()・int64 キーワードを廃止 - uptime コマンドを GetTickCount64() の完全な64bit値を格納するよう変更し 49.7日オーバーフロー制限を解消。uptime64 コマンドは uptime に統合し廃止 - sprintf2 の %d/%i/%o/%u/%x/%X が64bit値を正しく出力するよう 内部で %lld 等に自動変換する処理を追加 (GetInt64Val 関数も追加) - 関連ドキュメント(uptime64.html)・テストファイルを更新 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TTLFor, TTLInt2Str, TTLStr2Int で GetIntVal (int) を GetInt64Val (long long) に置き換え、64bit 整数リテラルを 切り捨てなく扱えるようにする。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
types.html (英語・日本語) の整数型の説明を 符号付き 32bit (-2147483648〜2147483647) から 符号付き 64bit (-9223372036854775808〜9223372036854775807) に修正する。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
前回の編集で Language= 行の Shift-JIS バイトが UTF-8 置換文字 (U+FFFD) に化けていたのを元に戻す。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
TTL マクロの整数型を 32-bit から 64-bit (
long long) に拡張します。別途
int64型やuptime64コマンドを追加するのではなく、既存の整数型そのものを 64-bit 化することで、後方互換性を保ちつつ大きな値を扱えるようにします。主な変更点
int→long longに変更int64型の廃止: 別型として導入していたint64型を削除し、通常の整数型が 64-bit にuptime64コマンドの廃止:uptimeコマンドが 64-bit 値を返すようになったためuptime64を削除GetTickCount()→GetTickCount64(): タイマー精度の向上テスト計画
tests/int64_arith_test.ttlで算術・比較演算が正しく動作することを確認tests/uptime_test.ttlでuptimeコマンドが 64-bit 値を返すことを確認🤖 Generated with Claude Code