cpio -S -b flags

Andrew H. Marrinson andy at icom.UUCP
Sun Sep 7 03:24:25 AEST 1986


> 	There are two undocumented options, `-S' and `-b', that are supposed
> to be for "swap half words" and "swap both words".  I'm not sure under what
> circumstance these switches would be used (swap halfwords only when 
> 1/2 word != byte?  Swap both when in `pass' mode?).  Any explanation?
> -- 
> 	Greg Earle		UUCP: sdcrdcf!smeagol!earle; attmail!earle
> 	JPL			ARPA: elroy!smeagol!earle at csvax.caltech.edu

Assuming these are the same as in sysV, I believe halfwords refers
(ambiguously) to 16-bit quantites.  The -b option does both byte-swapping
and halfword (word) swapping.  To summarize then:

byte:		0	1	2	3	4	5	6	7
contents:	A	B	C	D	E	F	G	H
-s:		B	A	D	C	F	E	H	G
-S:		C	D	A	B	G	H	E	F
-b:		D	C	B	A	H	G	F	E

I seem to recall that when DEC introduced the VAX, longwords (32-bit) were
stored "word-swapped" from the order implied by the multiply/divide
instructions on the PDP-11, or at least from the order used in the PDP-11 C
compiler, thus requiring the -S flag.

I wonder if vn adds the .signature?  Just to be safe here it is, possibly
twice:

	andy at icom.UUCP
	Or for those of		Andrew H. Marrinson
	you who wish to		ICOM Systems, Inc.
	play it the hard	Arlington Heights, IL 60005
	way: ihnp4!icom!andy

-- 

	andy at icom.UUCP
	Or for those of		Andrew H. Marrinson
	you who wish to		ICOM Systems, Inc.
	play it the hard	Arlington Heights, IL 60005
	way: ihnp4!icom!andy



More information about the Comp.unix.wizards mailing list