[comp.lang.c] Wanted: code fragment to do two's complement sign extension

kushmer@bnlux0.bnl.gov (christopher kushmerick) (04/14/90)

I have a data file from an Aspect 3000 computer based NMR machine. The file
consists mostly of integers, and it is only the integers I am interested in.

The aspect 3000 uses three-byte words exclusively. I want to convert the
three-word signed two's complement integers to vax four-byte integers. I 
am using vax c under vms.

Well, my c is rusty, and I never was too handy with those bit wise operators,
so I am having trouble with this seemingly trivia task. So if some kind
sole could run me through it I would be grateful.

Email please, if possible.
Thank you,



-- 
Chris Kushmerick

kushmer@bnlux0.bnl.gov
kushmerick@pofvax.sunysb.edu