home *** CD-ROM | disk | FTP | other *** search
- /*
- * LSBFirstWriteShort() - description
- *
- * RCS:
- * $Revision: 2.3 $
- * $Date: 1996/05/03 02:21:34 $
- *
- * Security:
- * Unclassified
- *
- * Description:
- * Adapted from ImageMagick
- *
- * Input Parameters:
- * type identifier description
- *
- * text
- *
- * Output Parameters:
- * type identifier description
- *
- * text
- *
- * Return Values:
- * value description
- *
- * Side Effects:
- * text
- *
- * Limitations and Comments:
- * text
- *
- * Development History:
- * when who why
- * 08/05/94 muquit first cut
- */
- /*
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % %
- % %
- % %
- % L S B F i r s t W r i t e S h o r t %
- % %
- % %
- % %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
- % Function LSBFirstWriteShort writes a long value as a 16 bit quantity in
- % least-significant byte first order.
- %
- % The format of the LSBFirstWriteShort routine is:
- %
- % LSBFirstWriteShort(value,file)
- %
- % A description of each parameter follows.
- %
- % o value: Specifies the value to write.
- %
- % o file: Specifies the file to write the data to.
- %
- %
- */
-
- #include "combine.h"
-
- void LSBFirstWriteShort(value,file)
- unsigned int
- value;
-
- FILE
- *file;
- {
- unsigned char
- buffer[2];
-
- buffer[0]=(unsigned char) (value);
- buffer[1]=(unsigned char) ((value) >> 8);
- (void) fwrite((char *) buffer,1,2,file);
- }
-