source: buchla-68k/libcio/putl.c

Last change on this file was f261cc8, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Minor cleanup.

  • Property mode set to 100644
File size: 601 bytes
RevLine 
[f40a309]1/*
2 ============================================================================
3 putl.c -- put a Motorola 68000 long word onto a stream file
4 Version 2 -- 1987-10-15 -- D.N. Lynx Crowe
5
6 WARNING: This fails if the stream is ASCII.
7 ============================================================================
8*/
9
[b28a12e]10#include "ram.h"
[f40a309]11
[7258c6a]12void putl(int32_t w, FILE *stream)
[f40a309]13{
[8973acd]14 if (putc(((int16_t)(w >> 24) & 0xFF), stream) < 0)
[f40a309]15 return;
16
[8973acd]17 if (putc((int16_t)((w >> 16) & 0xFF), stream) < 0)
[f40a309]18 return;
19
[8973acd]20 if (putc((int16_t)((w >> 8) & 0xFF), stream) < 0)
[f40a309]21 return;
22
[f261cc8]23 putc((int16_t)(w & 0xFF), stream);
[f40a309]24}
[6262b5c]25
Note: See TracBrowser for help on using the repository browser.