Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion doc/develop.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*develop.txt* For Vim バージョン 9.1. Last change: 2025 Aug 11
*develop.txt* For Vim バージョン 9.1. Last change: 2025 Sep 01


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -358,6 +358,35 @@ VAX V7.3 では Compaq C V6.4-005 を使用してビルドする必要がある
unsigned 32-bit またはそれ以上の unsigned


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

Vim は現在、ほとんどの内部関数プロトタイプに従来のヘッダーファイル (`.h`) を使
用していない。代わりに、現在のアーキテクチャでは `src/proto/` ディレクトリ内の
個別の `.pro` ファイルを使用し、`.c` ファイルごとに 1 つの `.pro` ファイルを使
用する。

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

これらのファイルのバンドルは自動化されていない。`src/proto.h` ヘッダーは、各
`.pro` ファイルごとに 1 つずつ、手動で記述する `#include` ディレクティブのリス
トで構成されている。

この設計のため、このアーキテクチャ内に新しいソースファイルを統合するには、対応
する `.pro` ファイルを作成し、新しい `#include` ディレクティブを `proto.h` に
手動で追加し、このファイルを `src/Makefile` と `src/Make_mvc.mak` の両方に手動
で追加する必要がある。

`src/Makefile` には `make proto` ターゲットが存在し、本来の目的は `.pro` ファ
イルの更新プロセスを自動化することでした。しかし、このターゲットは信頼性が低
く、主要プラットフォーム (例えば、macOS) では動作せず、新リリースワークフロー
の一部に過ぎない。実際には、コントリビューターは関数シグネチャを追加、削除、ま
たは変更する際に、関連する `.pro` ファイルを手動で編集している。

このシステムは、Vim の関数がまだ K&R スタイルで書かれていたバージョン 1.24 以
降で導入されている。

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

Expand Down
30 changes: 29 additions & 1 deletion en/develop.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*develop.txt* For Vim version 9.1. Last change: 2025 Aug 11
*develop.txt* For Vim version 9.1. Last change: 2025 Sep 01


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -362,6 +362,34 @@ We follow POSIX.1-2001 (SUSv3) for type sizes, which in practice means:
unsigned 32-bit or larger unsigned


FUNCTION PROTOTYPES *assumptions-prototypes*

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

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

The bundling of these files is not automated. The `src/proto.h` header is
composed of a list of manual `#include` directives, one for each individual
`.pro` file.

Due to this design, integrating a new source file within this architecture
involves creating a corresponding `.pro` file, manually adding a new `#include`
directive to `proto.h` and manually adding this file to both `src/Makefile` and
`src/Make_mvc.mak`.

A `make proto` target exists in `src/Makefile` with the original goal of
automating the process of updating the `.pro` files. However, this target is
unreliable, fails on major platforms (e.g., macOS), and is only part of the
new release workflow. In practice, contributors edit the relevant `.pro` files
by hand when adding, removing, or modifying a function signatures.

This system has been in place since at least v1.24, when Vim’s functions were
still written in K&R style.

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

Expand Down