Skip to content

Commit 158599e

Browse files
authored
Merge pull request #2289 from h-east/update-develop
Update develop.{txt,jax}
2 parents 6a71e7f + 7c800e4 commit 158599e

File tree

2 files changed

+59
-2
lines changed

2 files changed

+59
-2
lines changed

doc/develop.jax

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*develop.txt* For Vim バージョン 9.1. Last change: 2025 Aug 11
1+
*develop.txt* For Vim バージョン 9.1. Last change: 2025 Sep 01
22

33

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

360360

361+
☆関数プロトタイプ *assumptions-prototypes*
362+
363+
Vim は現在、ほとんどの内部関数プロトタイプに従来のヘッダーファイル (`.h`) を使
364+
用していない。代わりに、現在のアーキテクチャでは `src/proto/` ディレクトリ内の
365+
個別の `.pro` ファイルを使用し、`.c` ファイルごとに 1 つの `.pro` ファイルを使
366+
用する。
367+
368+
従来の自己完結型ヘッダーファイルとは異なり、これらの `.pro` ファイルには、API
369+
ドキュメント、構造体と列挙型の定義、その他の宣言は含まれず、関数のプロトタイプ
370+
のみが含まれる。
371+
372+
これらのファイルのバンドルは自動化されていない。`src/proto.h` ヘッダーは、各
373+
`.pro` ファイルごとに 1 つずつ、手動で記述する `#include` ディレクティブのリス
374+
トで構成されている。
375+
376+
この設計のため、このアーキテクチャ内に新しいソースファイルを統合するには、対応
377+
する `.pro` ファイルを作成し、新しい `#include` ディレクティブを `proto.h`
378+
手動で追加し、このファイルを `src/Makefile``src/Make_mvc.mak` の両方に手動
379+
で追加する必要がある。
380+
381+
`src/Makefile` には `make proto` ターゲットが存在し、本来の目的は `.pro` ファ
382+
イルの更新プロセスを自動化することでした。しかし、このターゲットは信頼性が低
383+
く、主要プラットフォーム (例えば、macOS) では動作せず、新リリースワークフロー
384+
の一部に過ぎない。実際には、コントリビューターは関数シグネチャを追加、削除、ま
385+
たは変更する際に、関連する `.pro` ファイルを手動で編集している。
386+
387+
このシステムは、Vim の関数がまだ K&R スタイルで書かれていたバージョン 1.24 以
388+
降で導入されている。
389+
361390
==============================================================================
362391
4. コーディングスタイル *coding-style*
363392

en/develop.txt

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*develop.txt* For Vim version 9.1. Last change: 2025 Aug 11
1+
*develop.txt* For Vim version 9.1. Last change: 2025 Sep 01
22

33

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

364364

365+
FUNCTION PROTOTYPES *assumptions-prototypes*
366+
367+
Vim currently does not use conventional header files (`.h`) for most internal
368+
function prototypes. Instead, the current architecture uses individual `.pro`
369+
files in the `src/proto/` directory, with one `.pro` file per `.c` file.
370+
371+
Unlike traditional self-contained header files, these `.pro` files do not
372+
contain API documentation, struct and enum definitions, or other declaration;
373+
only function prototypes.
374+
375+
The bundling of these files is not automated. The `src/proto.h` header is
376+
composed of a list of manual `#include` directives, one for each individual
377+
`.pro` file.
378+
379+
Due to this design, integrating a new source file within this architecture
380+
involves creating a corresponding `.pro` file, manually adding a new `#include`
381+
directive to `proto.h` and manually adding this file to both `src/Makefile` and
382+
`src/Make_mvc.mak`.
383+
384+
A `make proto` target exists in `src/Makefile` with the original goal of
385+
automating the process of updating the `.pro` files. However, this target is
386+
unreliable, fails on major platforms (e.g., macOS), and is only part of the
387+
new release workflow. In practice, contributors edit the relevant `.pro` files
388+
by hand when adding, removing, or modifying a function signatures.
389+
390+
This system has been in place since at least v1.24, when Vim’s functions were
391+
still written in K&R style.
392+
365393
==============================================================================
366394
4. Coding style *coding-style*
367395

0 commit comments

Comments
 (0)