From: fjs@mrst.uucp (Fred J. Sena)
Newsgroups: comp.unix.programmer,comp.sys.sun.apps,comp.unix.questions,comp.unix.perl
Subject: Re: SCCS to RCS Conversion
Date: 24 Nov 92 00:21:53 GMT
Organization: MRS Technology, Inc.

hi,

I received several solutions to the SCCS to RCS conversion problem, as well
as several requests for information about this.  I would have mailed this out
to the individuals who asked for it, but I accidently deleted those messages.

Anywho, enclosed you will find a script that works great for RCS to SCCS
conversion.

Many thanks to:
	eggert@twinsun.com (Paul Eggert)
	rfs@se28.wg2.waii.com (Robert Starr)
	harvard!gynko.circ.upenn.edu!rsk (Rich Kulawiec)

For their replies.  And thanks to Karl Fox who wrote the original script.

	--fred
							fjs@mrst

-----------------------------------------------------------------------------
#!/bin/sh
#
# GENTLE READER -- write this message to file [no headers!]; run "sh file".
#
# [un]shark: Copyleft 1987-91 by James A. Woods.  Patent pending.
# Seed planted by Karl Fox; code intensified by Paul Eggert.
#
# "Cleverly he dialed from within." -- D. Van Vliet, "Trout Mask Replica"
#
PATH=$PATH:. a=atob m=unshark z=zcat
r="rm -f $a $m* $z" v="cc -o $z $m.c"
trap "$r;exit 1" 1 2 13 15
echo decoding...
(:|compress|btoa|$a|$z)2>$m>&2||(sed '1,9s/./#define & /
s/@/[w]/g
s/C/char /g
s/I/;if(/g
s/W/;while(/g
s/Y/%lx /g
s/}/;}/g'>$m.c<<_&&
FX,perror("$m bite: resend"),1;
GgetC()
H(w=g())
K[69001]
PputC
Q256
U*p
Xreturn 0
Zw=QWw--)t@=0
#include<stdio.h>
long M,N,c,f,m,o,r,s,w;y(l){o=o&-1-l|-1-o&l;m+=l+1;f+=f+(f>>31&1)+l}int
O,S,e,i,k,n,q,t K;b(g){k=4Wg<k)y(P((C)(w>>--k*8)&255));w=0}CD K,h
K;main(g,V)C**V;{I**V-97)X,a()WG-10)W(g=G)+1&&g-'x')if(g-10)
{I4<k)b(0)Ig>32&g<'v')w=w*85+g-33,++k;else{Ig-'z'|k)F
w=0;k=5}}WG-78)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