% rcs.cd % Anders G S Svensson % $Date: 1996/02/10 21:43:45 $ % $Revision: 1.1 $ % Convert RCS strings into something palatable. \def\rcsdate$#1: #2/#3/#4#5 #6 ${\dateformat#4#5 #3 #2 } % #1#2 <- day % #3 <- month % #4 <- year % \def\DMYformat#1#2 #3 #4 {\dayformat#1#2 \monthname{#3} #4} \def\MDYformat#1#2 #3 #4 {\monthname{#3} \dayformat#1#2, #4} \def\stampformat#1#2 #3 #4 {#1#2 \shortmonthname{#3} #4} \DeclareOption{DMY}{\let\dateformat\DMYformat} \DeclareOption{MDY}{\let\dateformat\MDYformat} \DeclareOption{stamp}{\let\dateformat\stampformat} \def\dayformat#1#2{\ifnum#1>0 #1\fi#2} \DeclareOption{leadingzero}{\let\dayformat\relax} \def\monthname#1{% \ifcase#1\relax \or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi} \def\shortmonthname#1{% \ifcase#1\relax \or Jan\or Feb\or Mar\or Apr\or May\or Jun\or Jul\or Aug\or Sep\or Oct\or Nov\or Dec\fi} \DeclareOption{shortmonths}{\let\monthname\shortmonthname} \def\rcsrevision$#1: #2 ${Revision \revisionformat#2 } \def\revisionformat#1 {#1} \def\r@patchlevels{\def\revisionformat##1 {\rcsstrip{13}{##1}}} \def\r@shortrevisions{\def\revisionformat##1 {\rcsstrip3{##1}}} \DeclareOption{patchlevels}{\r@patchlevels} \DeclareOption{shortrevisions}{\r@shortrevisions} \def\rcsstrip#1#2{{\count0=1 \r@rcspeel{#1}#2. }} \def\r@rcspeel#1#2.#3 {% \r@scan#10 {\r@separate#2}% \def\r@tmp{#3}% \ifx\r@tmp\empty \let\r@action\relax \else \def\r@action{\advance\count0 by 1 \r@rcspeel{#1}#3 }% \fi \r@action} \def\r@separate{\def\r@separate{.}} \def\r@scan#1#2 #3{% \ifnum#1=0 \def\r@action{#3}% \else \ifnum\count0=#1 \let\r@action\relax \else \def\r@action{\r@scan#2 {#3}}% \fi \fi \r@action} \ExecuteOptions{MDY}