-extern uint32_t read_uint32_bigendian(FILE * file) {
-// Read uint32 from file in big-endian order.
- unsigned char a = fgetc(file);
- unsigned char b = fgetc(file);
- unsigned char c = fgetc(file);
- unsigned char d = fgetc(file);
- return (a * uchar_s * uchar_s * uchar_s) + (b * uchar_s * uchar_s) + (c * uchar_s) + d; }
+extern void write_uint16_bigendian( uint16_t x, FILE * file )
+{
+ fputc( x >> 8, file );
+ fputc( x & 0xFF, file );
+}