1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! `patchlevel.h` port — upstream zsh patch-level identifier.
//!
//! Port of `Src/patchlevel.h`. The C header defines a single
//! preprocessor constant `ZSH_PATCHLEVEL` that names the upstream
//! source revision the rest of the tree was built from. It's read
//! by `init.c` to populate the `$ZSH_PATCHLEVEL` shell parameter
//! and by the `zsh --version` startup-banner code.
//!
//! C source: 1 `#define`, 0 structs/enums/fns.
/// Port of `#define ZSH_PATCHLEVEL` from `Src/patchlevel.h:1`.
///
/// The upstream source-revision tag the C tree was generated from.
/// Format follows the convention `zsh-MAJOR.MINOR.PATCH-test-N-gHASH`
/// (where the trailing `-N-gHASH` is appended by `git describe`
/// during the upstream release process).
///
/// zshrs reads this constant verbatim from the upstream snapshot in
/// `src/zsh/Src/patchlevel.h` so the `$ZSH_PATCHLEVEL` shell
/// parameter (params.rs:1690) reports the same value zsh would on
/// the same source tree.
pub const ZSH_PATCHLEVEL: &str = "zsh-5.9-465-g6b9704e"; // c:1
/// Port of `#define ZSH_VERSION` (generated by `Src/Makemod:544`).
///
/// C body: `echo '#define ZSH_VERSION "'$(VERSION)'"' > $@`
/// — the build glue writes `VERSION` from `Config/version.mk` into
/// a generated header that init.c reads. zshrs holds the same value
/// as a Rust `const` since the build is cargo-driven, not make-driven.
/// Read by `params.rs::createparamtable` (c:966 — `setsparam("ZSH_VERSION", ZSH_VERSION)`)
/// and by the `--version` startup banner.
pub const ZSH_VERSION: &str = "5.9.0.3-test"; // Config/version.mk:VERSION