Permalink
Browse files

nickname support

git-svn-id: https://svn.r-project.org/R/trunk@58809 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information...
1 parent 2e778d6 commit 6bdb7f69a32f94abbe85c62b8a80cf90d4b37aa8 pd committed Mar 23, 2012
Showing with 8 additions and 3 deletions.
  1. +1 −0 VERSION-NICK
  2. +5 −3 src/main/version.c
  3. +2 −0 tools/GETVERSION
View
@@ -0,0 +1 @@
+Unsuffered Consequences
View
@@ -1,7 +1,7 @@
/*
* R : A Computer Language for Statistical Data Analysis
* Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka
- * Copyright (C) 1998--2011 The R Development Core Team
+ * Copyright (C) 1998--2012 The R Development Core Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,8 +50,8 @@ SEXP attribute_hidden do_version(SEXP call, SEXP op, SEXP args, SEXP env)
char buf[128];
checkArity(op, args);
- PROTECT(value = allocVector(VECSXP,13));
- PROTECT(names = allocVector(STRSXP,13));
+ PROTECT(value = allocVector(VECSXP,14));
+ PROTECT(names = allocVector(STRSXP,14));
SET_STRING_ELT(names, 0, mkChar("platform"));
SET_VECTOR_ELT(value, 0, mkString(R_PLATFORM));
@@ -84,6 +84,8 @@ SEXP attribute_hidden do_version(SEXP call, SEXP op, SEXP args, SEXP env)
PrintVersionString(buf);
SET_STRING_ELT(names, 12, mkChar("version.string"));
SET_VECTOR_ELT(value, 12, mkString(buf));
+ SET_STRING_ELT(names, 13, mkChar("nickname"));
+ SET_VECTOR_ELT(value, 13, mkString(R_NICK));
setAttrib(value, R_NamesSymbol, names);
UNPROTECT(2);
View
@@ -5,6 +5,7 @@ TOOLS_DIR=`echo ${0} | sed 's%/[^/][^/]*$%%'`
maj=`sed 's/\([^ .]*\).\([^ ]*\) *\(.*\)/\1/' < ${TOOLS_DIR}/../VERSION`
min=`sed 's/\([^ .]*\).\([^ ]*\) *\(.*\)/\2/' < ${TOOLS_DIR}/../VERSION`
rev=`sed 's/\([^ .]*\).\([^ ]*\) *\(.*\)/\3/' < ${TOOLS_DIR}/../VERSION`
+ nick=`cat ${TOOLS_DIR}/../VERSION-NICK`
pl=`echo ${min} | sed 's/\..*//'`
sl=`echo ${min} | sed 's/.*\.//'`
ver=`expr ${maj} \\* 65536 + ${pl} \\* 256 + ${sl}`
@@ -31,6 +32,7 @@ TOOLS_DIR=`echo ${0} | sed 's%/[^/][^/]*$%%'`
echo '#endif'
echo
echo "#define R_VERSION ${ver}"
+ echo "#define R_NICK \"${nick}\""
echo "#define R_Version(v,p,s) (((v) * 65536) + ((p) * 256) + (s))"
echo "#define R_MAJOR \"${maj}\""
echo "#define R_MINOR \"${min}\""

0 comments on commit 6bdb7f6

Please sign in to comment.