Guest User

Untitled

a guest
Jul 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. void WriteByteFromShort(short out, FILE * outFile)
  2. {
  3. char b = (char)out;
  4. fwrite(&b, sizeof(Uint8), 1, outFile);
  5. }
  6.  
  7. short ReadByteAsShort(FILE * inFile)
  8. {
  9. char b;
  10. fread(&b, sizeof(Uint8), 1, inFile);
  11.  
  12. return (short)b;
  13. }
Add Comment
Please, Sign In to add comment