struct {short hiword
; short loword
;}; /* stupid fp-11 */
fixl(p
) register long *p
;{
t
=p
->hiword
; p
->hiword
=p
->loword
; p
->loword
=t
;
int ifd
, ofd
, nbyt
, ttt
;
register char *infile
, *oufile
, *ap
;
long blen
,slen
,eadr
,trl
,drl
;
printf("usage : rmhead input output\n") ;
if ((ifd
= open(infile
,0)) < 0) {
printf("%s : cannot open\n",ap
) ;
if ((ofd
= creat(oufile
,0777)) < 0) {
read(ifd
,&head
,sizeof head
);
fixl(&head
.tlen
); fixl(&head
.dlen
);
if (seek(ifd
,sizeof head
,0) < 0) {
printf("input seek error\n") ;
if (head
.tlen
>4096) nbyt
=4096; else nbyt
=head
.tlen
;
while (nbyt
&0777) {write(ofd
,&zero
,1); ++nbyt
;}
if (head
.dlen
>4096) nbyt
=4096; else nbyt
=head
.dlen
;