michael@16: diff -Nau ChangeLog.orig ChangeLog michael@16: --- ChangeLog.orig 2008-07-18 09:57:29.000000000 +0200 michael@16: +++ ChangeLog 2009-01-06 01:29:18.000000000 +0100 michael@16: @@ -114,6 +114,9 @@ michael@16: michael@16: Changes between 2.0.1 and 2.0.2 (11-Aug-2004 to 15-Jun-2005): michael@16: michael@16: + *) Added ISO C++ language output to "shtool version". michael@16: + [Michael Schloh von Bennewitz ] michael@16: + michael@16: *) Fix insecure temporary file handling (CAN-2005-1751, CAN-2005-1759). michael@16: [Eric Romang , Ralf S. Engelschall] michael@16: michael@16: diff -Nau RATIONAL.orig RATIONAL michael@16: --- RATIONAL.orig 2008-04-02 22:10:17.000000000 +0200 michael@16: +++ RATIONAL 2009-01-06 01:30:19.000000000 +0100 michael@16: @@ -6,8 +6,8 @@ michael@16: michael@16: GNU shtool -- The GNU Portable Shell Tool michael@16: michael@16: - RATIONAL michael@16: - ======== michael@16: + RATIONALE michael@16: + ========= michael@16: michael@16: The Context michael@16: michael@16: diff -Nau sh.version.orig sh.version michael@16: --- sh.version.orig 2008-04-02 22:10:17.000000000 +0200 michael@16: +++ sh.version 2009-01-06 01:32:32.000000000 +0100 michael@16: @@ -211,7 +211,7 @@ michael@16: ;; michael@16: c ) michael@16: echo >>$file "/*" michael@16: - echo >>$file "** ${file} -- Version Information for ${name} (syntax: C/C++)" michael@16: + echo >>$file "** ${file} -- Version Information for ${name} (syntax: C)" michael@16: echo >>$file "** [automatically generated and maintained by GNU shtool]" michael@16: echo >>$file "*/" michael@16: echo >>$file "" michael@16: @@ -257,6 +257,65 @@ michael@16: echo >>$file "#endif /* _${filestr}_AS_HEADER_ */" michael@16: echo >>$file "" michael@16: ;; michael@16: + cxx ) michael@16: + echo >>$file "//" michael@16: + echo >>$file "// ${file} -- Version Information for ${name} (syntax: ISO C++)" michael@16: + echo >>$file "// [automatically generated and maintained by GNU shtool]" michael@16: + echo >>$file "//" michael@16: + echo >>$file "" michael@16: + echo >>$file "#ifdef _${filestr}_AS_HEADER_" michael@16: + echo >>$file "" michael@16: + echo >>$file "#ifndef _${filestr}_" michael@16: + echo >>$file "#define _${filestr}_" michael@16: + echo >>$file "" michael@16: + echo >>$file "#define ${prefixupper}VERSION ${vHex}" michael@16: + echo >>$file "" michael@16: + echo >>$file "typedef class ${prefix}version_class {" michael@16: + echo >>$file "private:" michael@16: + echo >>$file " const int v_hex;" michael@16: + echo >>$file " const char *v_short;" michael@16: + echo >>$file " const char *v_long;" michael@16: + echo >>$file " const char *v_tex;" michael@16: + echo >>$file " const char *v_gnu;" michael@16: + echo >>$file " const char *v_web;" michael@16: + echo >>$file " const char *v_sccs;" michael@16: + echo >>$file " const char *v_rcs;" michael@16: + echo >>$file "public:" michael@16: + echo >>$file " ${prefix}version_class(void) : \\" michael@16: + echo >>$file " v_hex(${vHex}), \\" michael@16: + echo >>$file " v_short(\"${vShort}\"), \\" michael@16: + echo >>$file " v_long(\"${vLong}\"), \\" michael@16: + echo >>$file " v_tex(\"${vTeX}\"), \\" michael@16: + echo >>$file " v_gnu(\"${vGNU}\"), \\" michael@16: + echo >>$file " v_web(\"${vWeb}\"), \\" michael@16: + echo >>$file " v_sccs(\"${vSCCS}\"), \\" michael@16: + echo >>$file " v_rcs(\"${vRCS}\") \\" michael@16: + echo >>$file " {}" michael@16: + echo >>$file " const int getHex(void) {return (v_hex);};" michael@16: + echo >>$file " const char *getShort(void) {return (v_short);};" michael@16: + echo >>$file " const char *getLong(void) {return (v_long);};" michael@16: + echo >>$file " const char *getTex(void) {return (v_tex);};" michael@16: + echo >>$file " const char *getGnu(void) {return (v_gnu);};" michael@16: + echo >>$file " const char *getWeb(void) {return (v_web);};" michael@16: + echo >>$file " const char *getSccs(void) {return (v_sccs);};" michael@16: + echo >>$file " const char *getRcs(void) {return (v_rcs);};" michael@16: + echo >>$file "} ${prefix}version_t;" michael@16: + echo >>$file "" michael@16: + echo >>$file "extern ${prefix}version_t ${prefix}version;" michael@16: + echo >>$file "" michael@16: + echo >>$file "#endif // _${filestr}_" michael@16: + echo >>$file "" michael@16: + echo >>$file "#else // _${filestr}_AS_HEADER_" michael@16: + echo >>$file "" michael@16: + echo >>$file "#define _${filestr}_AS_HEADER_" michael@16: + echo >>$file "#include \"${file}\"" michael@16: + echo >>$file "#undef _${filestr}_AS_HEADER_" michael@16: + echo >>$file "" michael@16: + echo >>$file "${prefix}version_t ${prefix}version;" michael@16: + echo >>$file "" michael@16: + echo >>$file "#endif // _${filestr}_AS_HEADER_" michael@16: + echo >>$file "" michael@16: + ;; michael@16: m4 ) michael@16: echo >>$file "##" michael@16: echo >>$file "## ${file} -- Version Information for ${name} (syntax: M4)" michael@16: @@ -367,9 +426,9 @@ michael@16: michael@16: =item B<-l>, B<--language> I michael@16: michael@16: -Choose format of version file I. I="C", ANSI C michael@16: -(I="c"), M4 (I="m4"), Perl (I="perl") or Python michael@16: -(I="python"). Default is C. michael@16: +Choose format of version file I. I="C", ISO C michael@16: +(I="c"), ISO C++ (I="cxx"), M4 (I="m4"), Perl michael@16: +(I="perl") or Python (I="python"). Default is C. michael@16: michael@16: =item B<-n>, B<--name> I michael@16: michael@16: diff -Nau shtool.pod.orig shtool.pod michael@16: --- shtool.pod.orig 2008-04-02 22:10:17.000000000 +0200 michael@16: +++ shtool.pod 2009-01-06 01:32:54.000000000 +0100 michael@16: @@ -161,8 +161,8 @@ michael@16: michael@16: =item B michael@16: michael@16: -Maintain a version information file in either Text, C/C++, Perl or Python. michael@16: -format. michael@16: +Maintain a version information file in either Text, C, C++, M4, Perl or michael@16: +Python. michael@16: michael@16: =item B michael@16: