|
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 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -365,31 +365,17 @@ We follow POSIX.1-2001 (SUSv3) for type sizes, which in practice means: |
365 | 365 |
|
366 | 366 | FUNCTION PROTOTYPES *assumptions-prototypes* |
367 | 367 |
|
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. |
371 | 371 |
|
372 | 372 | 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; |
374 | 374 | only function prototypes. |
375 | 375 |
|
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. |
393 | 379 |
|
394 | 380 | ============================================================================== |
395 | 381 | 4. Coding style *coding-style* |
|
0 commit comments