mirror of
https://github.com/vim/vim.git
synced 2025-10-22 08:34:29 -04:00
runtime(doc): document use of proto files in develop.txt
closes: #17973 Signed-off-by: Damien Lejay <damien@lejay.be> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
f50504a87b
commit
0ed08788a1
@@ -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
|
||||
@@ -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*
|
||||
|
||||
|
@@ -6228,6 +6228,7 @@ assert_report() testing.txt /*assert_report()*
|
||||
assert_true() testing.txt /*assert_true()*
|
||||
assumptions-C-compiler develop.txt /*assumptions-C-compiler*
|
||||
assumptions-makefiles develop.txt /*assumptions-makefiles*
|
||||
assumptions-prototypes develop.txt /*assumptions-prototypes*
|
||||
assumptions-variables develop.txt /*assumptions-variables*
|
||||
astro.vim syntax.txt /*astro.vim*
|
||||
asy.vim syntax.txt /*asy.vim*
|
||||
|
Reference in New Issue
Block a user