|
3 | 3 | helpname: 'develop' |
4 | 4 | --- |
5 | 5 | <div id='vimCodeElement'> |
6 | | -<a class="Constant" href="develop.html" name="develop.txt">develop.txt</a> For <span class="Identifier">Vim バージョン 9.1.</span> Last change: 2025 Sep 29<br> |
| 6 | +<a class="Constant" href="develop.html" name="develop.txt">develop.txt</a> For <span class="Identifier">Vim バージョン 9.1.</span> Last change: 2025 Oct 09<br> |
7 | 7 | <br> |
8 | 8 | <br> |
9 | 9 | <span class="Identifier">VIMリファレンスマニュアル by Bram Moolenaar</span><br> |
|
366 | 366 | <br> |
367 | 367 | <span class="Statement">関数プロトタイプ</span> <a class="Constant" href="develop.html#assumptions-prototypes" name="assumptions-prototypes">assumptions-prototypes</a><br> |
368 | 368 | <br> |
369 | | -Vim は現在、ほとんどの内部関数プロトタイプに従来のヘッダーファイル (<span class="Comment">.h</span>) を使<br> |
370 | | -用していない。代わりに、現在のアーキテクチャでは <span class="Comment">src/proto/</span> ディレクトリ内の<br> |
371 | | -個別の <span class="Comment">.pro</span> ファイルを使用し、<span class="Comment">.c</span> ファイルごとに 1 つの <span class="Comment">.pro</span> ファイルを使<br> |
372 | | -用する。<br> |
| 369 | +Vim では、ほとんどの内部関数プロトタイプに従来のヘッダーファイル(<span class="Comment">.h</span>)を使用<br> |
| 370 | +していない。その代わりに、<span class="Comment">src/proto/</span> ディレクトリ内にある個別の <span class="Comment">.pro</span> ファ<br> |
| 371 | +イルを使用する構成になっており、各 <span class="Comment">.c</span> ファイルに対応して 1 つの <span class="Comment">.pro</span> ファ<br> |
| 372 | +イルが存在する。<br> |
373 | 373 | <br> |
374 | 374 | 従来の自己完結型ヘッダーファイルとは異なり、これらの <span class="Comment">.pro</span> ファイルには、API<br> |
375 | 375 | ドキュメント、構造体と列挙型の定義、その他の宣言は含まれず、関数のプロトタイプ<br> |
376 | 376 | のみが含まれる。<br> |
377 | 377 | <br> |
378 | | -これらのファイルのバンドルは自動化されていない。<span class="Comment">src/proto.h</span> ヘッダーは、各<br> |
379 | | -<span class="Comment">.pro</span> ファイルごとに 1 つずつ、手動で記述する <span class="Comment">#include</span> ディレクティブのリス<br> |
380 | | -トで構成されている。<br> |
381 | | -<br> |
382 | | -この設計のため、このアーキテクチャ内に新しいソースファイルを統合するには、対応<br> |
383 | | -する <span class="Comment">.pro</span> ファイルを作成し、新しい <span class="Comment">#include</span> ディレクティブを <span class="Comment">proto.h</span> に<br> |
384 | | -手動で追加し、このファイルを <span class="Comment">src/Makefile</span> と <span class="Comment">src/Make_mvc.mak</span> の両方に手動<br> |
385 | | -で追加する必要がある。<br> |
386 | | -<br> |
387 | | -<span class="Comment">src/Makefile</span> には <span class="Comment">make proto</span> ターゲットが存在し、本来の目的は <span class="Comment">.pro</span> ファ<br> |
388 | | -イルの更新プロセスを自動化することでした。しかし、このターゲットは信頼性が低<br> |
389 | | -く、主要プラットフォーム (例えば、macOS) では動作せず、新リリースワークフロー<br> |
390 | | -の一部に過ぎない。実際には、コントリビューターは関数シグネチャを追加、削除、ま<br> |
391 | | -たは変更する際に、関連する <span class="Comment">.pro</span> ファイルを手動で編集している。<br> |
392 | | -<br> |
393 | | -このシステムは、Vim の関数がまだ K&R スタイルで書かれていたバージョン 1.24 以<br> |
394 | | -降で導入されている。<br> |
| 378 | +<span class="Comment">src/Makefile</span> にある <span class="Comment">make proto</span> ターゲットは、Python スクリプト<br> |
| 379 | +proto/gen_prototypes.py を使ってほとんどの .pro ファイルを自動更新する。このス<br> |
| 380 | +クリプトは python3-clang モジュールに依存している。<span class="Todo">Note</span> 一部の .pro ファイルは<br> |
| 381 | +手作業で編集されていることに注意。<br> |
395 | 382 | <br> |
396 | 383 | <span class="PreProc">==============================================================================</span><br> |
397 | 384 | 4. コーディングスタイル <a class="Constant" href="develop.html#coding-style" name="coding-style">coding-style</a><br> |
|
0 commit comments