diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2009-01-09 20:28:30 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2009-01-09 20:28:30 +0000 |
commit | 18143c322614c6e81648b696d30e743068c24afa (patch) | |
tree | f73b3c27953231ae3053d382293c11d8b9b06000 | |
parent | cb9360e4453d93f40e2b48cd87d81394a4cda3f4 (diff) | |
download | zsh-18143c322614c6e81648b696d30e743068c24afa.tar.gz zsh-18143c322614c6e81648b696d30e743068c24afa.tar.xz zsh-18143c322614c6e81648b696d30e743068c24afa.zip |
262727: add $ZSH_PATCHLEVEL from ChangeLog revision
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Doc/Zsh/params.yo | 10 | ||||
-rw-r--r-- | Src/params.c | 2 | ||||
-rw-r--r-- | Src/zsh.mdd | 9 |
4 files changed, 23 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 4c419762b..1ff9da365 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2009-01-09 Peter Stephenson <p.w.stephenson@ntlworld.com> + * 26272: Doc/Zsh/params.yo, Src/params.c, Src/zsh.mdd, + * unposted: add RCS Revision tag for use in patchlevel recording. @@ -10874,5 +10876,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.4497 $ +* $Revision: 1.4498 $ ***************************************************** diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo index bc8a79450..79db4c613 100644 --- a/Doc/Zsh/params.yo +++ b/Doc/Zsh/params.yo @@ -727,6 +727,14 @@ item(tt(ZSH_NAME))( Expands to the basename of the command used to invoke this instance of zsh. ) +vindex(ZSH_PATCHLEVEL) +item(tt(ZSH_PATCHLEVEL))( +The revision string for the version number of the ChangeLog file +in the zsh distribution. This is most useful in order to keep +track of versions of the shell during development between releases; +hence most users should not use it and should instead rely on +tt($ZSH_VERSION). +) item(tt(zsh_scheduled_events))( See ifzman(the section `The zsh/sched Module' in zmanref(zshmodules))\ ifnzman(noderef(The zsh/sched Module)). @@ -740,7 +748,7 @@ and `tt(print $(print $ZSH_SUBSHELL))' output 1, while ) vindex(ZSH_VERSION) item(tt(ZSH_VERSION))( -The version number of this zsh. +The version number of the release of zsh. ) enditem() texinode(Parameters Used By The Shell)()(Parameters Set By The Shell)(Parameters) diff --git a/Src/params.c b/Src/params.c index 1a826bff4..89ab76bbf 100644 --- a/Src/params.c +++ b/Src/params.c @@ -31,6 +31,7 @@ #include "params.pro" #include "version.h" +#include "patchlevel.h" /* what level of localness we are at */ @@ -748,6 +749,7 @@ createparamtable(void) setsparam("VENDOR", ztrdup(VENDOR)); setsparam("ZSH_NAME", ztrdup(zsh_name)); setsparam("ZSH_VERSION", ztrdup(ZSH_VERSION)); + setsparam("ZSH_PATCHLEVEL", ztrdup(ZSH_PATCHLEVEL)); setaparam("signals", sigptr = zalloc((SIGCOUNT+4) * sizeof(char *))); for (t = sigs; (*sigptr++ = ztrdup(*t++)); ); diff --git a/Src/zsh.mdd b/Src/zsh.mdd index 1cba4b9dc..0d80b9259 100644 --- a/Src/zsh.mdd +++ b/Src/zsh.mdd @@ -33,12 +33,21 @@ init.o: bltinmods.list zshpaths.h zshxmods.h init.o params.o parse.o: version.h +params.o: patchlevel.h + # The main shell doesn't currently need zshcurses.h and zshterm.h, # but make sure these are built with the headers. # If it did need need them they would be in headers at the top instead. version.h: $(sdir_top)/Config/version.mk zshcurses.h zshterm.h echo '#define ZSH_VERSION "'$(VERSION)'"' > $@ +patchlevel.h: $(sdir_top)/ChangeLog + { \ + echo -n "#define ZSH_PATCHLEVEL "; \ + sed -ne 's/^\* *\$$Revision: 1.19 $$/"\1"/p' \ + $(sdir_top)/ChangeLog; \ + } >patchlevel.h + zshcurses.h: ../config.h @if test x$(ZSH_CURSES_H) != x; then \ echo "#include <$(ZSH_CURSES_H)>" >zshcurses.h; \ |