Skip to content

Commit 18fce51

Browse files
authored
Merge pull request #2344 from h-east/update-develop
Update develop.{txt,jax}
2 parents 37d1f84 + 01acdd1 commit 18fce51

File tree

2 files changed

+17
-44
lines changed

2 files changed

+17
-44
lines changed

doc/develop.jax

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*develop.txt* For Vim バージョン 9.1. Last change: 2025 Sep 29
1+
*develop.txt* For Vim バージョン 9.1. Last change: 2025 Oct 09
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -361,32 +361,19 @@ VAX V7.3 では Compaq C V6.4-005 を使用してビルドする必要がある
361361

362362
☆関数プロトタイプ *assumptions-prototypes*
363363

364-
Vim は現在、ほとんどの内部関数プロトタイプに従来のヘッダーファイル (`.h`) を使
365-
用していない。代わりに、現在のアーキテクチャでは `src/proto/` ディレクトリ内の
366-
個別の `.pro` ファイルを使用し、`.c` ファイルごとに 1 つの `.pro` ファイルを使
367-
用する
364+
Vim では、ほとんどの内部関数プロトタイプに従来のヘッダーファイル`.h`)を使用
365+
していない。その代わりに、`src/proto/` ディレクトリ内にある個別の `.pro` ファ
366+
イルを使用する構成になっており、各 `.c` ファイルに対応して 1 つの `.pro` ファ
367+
イルが存在する
368368

369369
従来の自己完結型ヘッダーファイルとは異なり、これらの `.pro` ファイルには、API
370370
ドキュメント、構造体と列挙型の定義、その他の宣言は含まれず、関数のプロトタイプ
371371
のみが含まれる。
372372

373-
これらのファイルのバンドルは自動化されていない。`src/proto.h` ヘッダーは、各
374-
`.pro` ファイルごとに 1 つずつ、手動で記述する `#include` ディレクティブのリス
375-
トで構成されている。
376-
377-
この設計のため、このアーキテクチャ内に新しいソースファイルを統合するには、対応
378-
する `.pro` ファイルを作成し、新しい `#include` ディレクティブを `proto.h`
379-
手動で追加し、このファイルを `src/Makefile``src/Make_mvc.mak` の両方に手動
380-
で追加する必要がある。
381-
382-
`src/Makefile` には `make proto` ターゲットが存在し、本来の目的は `.pro` ファ
383-
イルの更新プロセスを自動化することでした。しかし、このターゲットは信頼性が低
384-
く、主要プラットフォーム (例えば、macOS) では動作せず、新リリースワークフロー
385-
の一部に過ぎない。実際には、コントリビューターは関数シグネチャを追加、削除、ま
386-
たは変更する際に、関連する `.pro` ファイルを手動で編集している。
387-
388-
このシステムは、Vim の関数がまだ K&R スタイルで書かれていたバージョン 1.24 以
389-
降で導入されている。
373+
`src/Makefile` にある `make proto` ターゲットは、Python スクリプト
374+
proto/gen_prototypes.py を使ってほとんどの .pro ファイルを自動更新する。このス
375+
クリプトは python3-clang モジュールに依存している。Note 一部の .pro ファイルは
376+
手作業で編集されていることに注意。
390377

391378
==============================================================================
392379
4. コーディングスタイル *coding-style*

en/develop.txt

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*develop.txt* For Vim version 9.1. Last change: 2025 Sep 29
1+
*develop.txt* For Vim version 9.1. Last change: 2025 Oct 09
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -365,31 +365,17 @@ We follow POSIX.1-2001 (SUSv3) for type sizes, which in practice means:
365365

366366
FUNCTION PROTOTYPES *assumptions-prototypes*
367367

368-
Vim currently does not use conventional header files (`.h`) for most internal
369-
function prototypes. Instead, the current architecture uses individual `.pro`
370-
files in the `src/proto/` directory, with one `.pro` file per `.c` file.
368+
Vim does not use conventional header files (`.h`) for most internal function
369+
prototypes. Instead, the current architecture uses individual `.pro` files in
370+
the `src/proto/` directory, with one `.pro` file per `.c` file.
371371

372372
Unlike traditional self-contained header files, these `.pro` files do not
373-
contain API documentation, struct and enum definitions, or other declaration;
373+
contain API documentation, struct and enum definitions, or other declarations;
374374
only function prototypes.
375375

376-
The bundling of these files is not automated. The `src/proto.h` header is
377-
composed of a list of manual `#include` directives, one for each individual
378-
`.pro` file.
379-
380-
Due to this design, integrating a new source file within this architecture
381-
involves creating a corresponding `.pro` file, manually adding a new `#include`
382-
directive to `proto.h` and manually adding this file to both `src/Makefile` and
383-
`src/Make_mvc.mak`.
384-
385-
A `make proto` target exists in `src/Makefile` with the original goal of
386-
automating the process of updating the `.pro` files. However, this target is
387-
unreliable, fails on major platforms (e.g., macOS), and is only part of the
388-
new release workflow. In practice, contributors edit the relevant `.pro` files
389-
by hand when adding, removing, or modifying a function signatures.
390-
391-
This system has been in place since at least v1.24, when Vim's functions were
392-
still written in K&R style.
376+
The `make proto` target in `src/Makefile` automates updating most of the .pro
377+
files using the Python script proto/gen_prototypes.py, which relies on the
378+
python3-clang module. Note that a few proto files are hand edited.
393379

394380
==============================================================================
395381
4. Coding style *coding-style*

0 commit comments

Comments
 (0)