From 54cb0093e919d71d8fa881b5e096d4899bfbe94b Mon Sep 17 00:00:00 2001 From: h-east Date: Sat, 11 Oct 2025 10:20:25 +0900 Subject: [PATCH 1/2] Update develop.{txt,jax} --- doc/develop.jax | 29 ++++++++--------------------- en/develop.txt | 30 ++++++++---------------------- 2 files changed, 16 insertions(+), 43 deletions(-) diff --git a/doc/develop.jax b/doc/develop.jax index 17f709a59..91ea957f6 100644 --- a/doc/develop.jax +++ b/doc/develop.jax @@ -361,32 +361,19 @@ VAX V7.3 では Compaq C V6.4-005 を使用してビルドする必要がある ☆関数プロトタイプ *assumptions-prototypes* -Vim は現在、ほとんどの内部関数プロトタイプに従来のヘッダーファイル (`.h`) を使 -用していない。代わりに、現在のアーキテクチャでは `src/proto/` ディレクトリ内の -個別の `.pro` ファイルを使用し、`.c` ファイルごとに 1 つの `.pro` ファイルを使 -用する。 +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 以 -降で導入されている。 +`src/Makefile` にある `make proto` ターゲットは、Python スクリプト +proto/gen_prototypes.py を使ってほとんどの .pro ファイルを自動更新する。このス +クリプトは python3-clang モジュールに依存している。Note 一部の .pro ファイルは +手作業で編集されていることに注意。 ============================================================================== 4. コーディングスタイル *coding-style* diff --git a/en/develop.txt b/en/develop.txt index 52d07b10b..922da7272 100644 --- a/en/develop.txt +++ b/en/develop.txt @@ -1,4 +1,4 @@ -*develop.txt* For Vim version 9.1. Last change: 2025 Sep 29 +*develop.txt* For Vim version 9.1. Last change: 2025 Oct 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -365,31 +365,17 @@ We follow POSIX.1-2001 (SUSv3) for type sizes, which in practice means: 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. +Vim 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; +contain API documentation, struct and enum definitions, or other declarations; 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. +The `make proto` target in `src/Makefile` automates updating most of the .pro +files using the Python script proto/gen_prototypes.py, which relies on the +python3-clang module. Note that a few proto files are hand edited. ============================================================================== 4. Coding style *coding-style* From 01acdd16eb6d5c10f5fef8576ce49fb84487f87d Mon Sep 17 00:00:00 2001 From: h-east Date: Mon, 13 Oct 2025 07:48:21 +0900 Subject: [PATCH 2/2] Fix by review --- doc/develop.jax | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/develop.jax b/doc/develop.jax index 91ea957f6..784b7cc54 100644 --- a/doc/develop.jax +++ b/doc/develop.jax @@ -1,4 +1,4 @@ -*develop.txt* For Vim バージョン 9.1. Last change: 2025 Sep 29 +*develop.txt* For Vim バージョン 9.1. Last change: 2025 Oct 09 VIMリファレンスマニュアル by Bram Moolenaar @@ -361,10 +361,10 @@ VAX V7.3 では Compaq C V6.4-005 を使用してビルドする必要がある ☆関数プロトタイプ *assumptions-prototypes* -Vim は、ほとんどの内部関数プロトタイプに従来のヘッダーファイル (`.h`) を使用し -ていない。代わりに、現在のアーキテクチャでは `src/proto/` ディレクトリ内の個別 -の `.pro` ファイルを使用し、`.c` ファイルごとに 1 つの `.pro` ファイルを使用す -る。 +Vim では、ほとんどの内部関数プロトタイプに従来のヘッダーファイル(`.h`)を使用 +していない。その代わりに、`src/proto/` ディレクトリ内にある個別の `.pro` ファ +イルを使用する構成になっており、各 `.c` ファイルに対応して 1 つの `.pro` ファ +イルが存在する。 従来の自己完結型ヘッダーファイルとは異なり、これらの `.pro` ファイルには、API ドキュメント、構造体と列挙型の定義、その他の宣言は含まれず、関数のプロトタイプ