GetTickCount64()への置き換えとTTLマクロへの64ビット整数型(int64) とコマンド(uptime64)追加#1333
Open
m-tmatma wants to merge 17 commits into
Open
GetTickCount64()への置き換えとTTLマクロへの64ビット整数型(int64) とコマンド(uptime64)追加#1333m-tmatma wants to merge 17 commits into
m-tmatma wants to merge 17 commits into
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.
This was referenced Jun 4, 2026
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.
Summary
GetTickCount()をGetTickCount64()に置き換え
GetTickCount()(32bit、約49.7日でオーバーフロー)をGetTickCount64()(64bit)に全面置き換えDWORDからULONGLONGに変更CheckTimeout()のDWORDオーバーフロー対策コード(49.7日ラップアラウンド処理)を削除して簡略化ttmenc.cのLOWORD(GetTickCount())、フォーマット文字列%d→%lluなども合わせて修正TTLマクロに64ビット整数型(int64)とuptime64コマンドを追加
int64 varname構文で64ビット整数変数を宣言できるようにしたuptime64 varnameコマンドを新規追加。int64変数に OS 起動からの経過時間(ミリ秒)を64ビットで格納uptimeは従来通り下位32ビットのみ格納(既存動作を維持)GetExpression)の内部型をintからlong longに変更し、int64変数の算術・比較が可能uptime64コマンドのドキュメント(英語・日本語)を追加HlpMacroCommandUptime64)を追加制約事項
GetTickCount64()は Windows Vista 以降で利用可能な API です。Windows XP 以前はサポート対象外となります。int64変数は宣言が必要(int64 varname)。宣言なしでは通常のint変数として生成されるintdim)の64ビット版は未対応変更ファイル一覧
ssh.h,tttypes.h,filesys_proto.h,dlglib.h,ftdlg.h,vtwin.h,ttlib.hbplus.c,quickvan.c,raw.c,xmodem.c,ymodem.c,zmodem.c,kermit.cdlglib.c,ftdlg.cpp,ftdlg_lite.cpp,filesys_proto.cppbuffer.c,vtterm.c,vtwin.cpp,teraterm.cpp,commlib.cttl.cpp,ttmenc.c,ttmparse.cpp,ttmparse.hssh.c,ssh.h,ttxssh.ccompat_win.cpp,ttlib.c,ProxyWSockHook.h,sendmem.cpp,filesys.cpp,filesys_log.cppdoc/en/html/macro/command/uptime64.html,doc/ja/html/macro/command/uptime64.html,doc/en/teraterm.hhc,doc/ja/teraterm.hhc,doc/en/teraterm.hhp,doc/ja/teraterm.hhpteraterm/common/helpid.htests/uptime_test.ttl,tests/uptime64_test.ttl,tests/uptime64.ttl,tests/wait_timeout_connected.ttl,tests/int64_arith_test.ttlTest plan
wait/waitregex等)が正常動作することint64 xで変数が宣言できることuptime64 xで64ビット値が格納されることint64変数同士の算術(加減乗除)・比較が正常動作すること(tests/int64_arith_test.ttl)tests/uptime64_test.ttlを実行し OK メッセージが表示されることtests/uptime64.ttlを実行し OK メッセージが表示されることtests/uptime_test.ttlを実行し OK メッセージが表示されることtests/wait_timeout_connected.ttlを接続済みセッションで実行し OK メッセージが表示されることuptimeコマンドが従来通り動作すること(int変数に下位32ビット格納)🤖 Generated with Claude Code