%****************************************************************************** % File: @(#)$OrigId: docversion-RCS.def,v 1.5 2016-11-05 14:16:06+01 martin Rel $ % Contents: Extension macros for the "docversion" package: support for the % Revision Control System (RCS) and other version control systems % with syntactically identical substitution strings % Author: Martin Lottermoser (Martin.Lottermoser at t-online.de) % %****************************************************************************** % % Copyright (C) Martin Lottermoser, 2009-2016 % This file may be used under the same terms as any version of my % "docversion" package. % %****************************************************************************** % Version information \ProvidesFile{docversion-RCS.def}[2016/11/05 Docversion extension for RCS] \ifx\@undefined\sourceidentification\else\sourceidentification{\whatstring $OrigId: docversion-RCS.def,v 1.5 2016-11-05 14:16:06+01 martin Rel $}\fi % Set CM-system-specific defaults \setdefaultdocversionid{0.0} % Helper macro to extract date and time information from an RCS "Date" value \newcommand*{\rcs@parseDateAndTime}[2]{% % Date: \def\rcs@tempa##1/##2\rcs@end{\def\rcs@tempb{##2}}% \rcs@tempa#1/\rcs@end \ifx\rcs@tempb\@empty \def\rcs@tempa##1-##2-##3\rcs@end{##1##2##3}% \else \def\rcs@tempa##1/##2/##3\rcs@end{##1##2##3}% \fi \edef\rcs@versiondate{\rcs@tempa#1\rcs@end}% % Time: \def\rcs@tempa##1:##2:##3##4##5\rcs@end{% \edef\rcs@versiontime{##1##2##3##4}% \edef\rcs@versiontimezone{##5}% empty, [-+]dd, or [-+]dd:dd }% \rcs@tempa#2\rcs@end % Convert RCS time zone specification to docversion format \ifx\@empty\rcs@versiontimezone \def\rcs@versiontimezone{+0000}\else \def\rcs@tempa##1:##2\rcs@end{\def\rcs@tempb{##2}}% \expandafter\rcs@tempa\rcs@versiontimezone:\rcs@end \ifx\@empty\rcs@tempb \edef\rcs@versiontimezone{\rcs@versiontimezone00}\else \def\rcs@tempa##1:##2\rcs@end{\edef\rcs@versiontimezone{##1##2}}% \expandafter\rcs@tempa\rcs@versiontimezone\rcs@end \fi \fi } % The macro |\setfileinfoRCS| expects an ordinary "Id" substitution string as % its first argument (although the actual keyword is irrelevant), including % the "$" delimiters. The value may either be the empty variant (i.e., without % a colon) or it should be the full version ( %