source: buchla-68k/libcio/putw.c@ 6099cac

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

Minor cleanup.

  • Property mode set to 100644
File size: 456 bytes
Line 
1/*
2 ============================================================================
3 putw.c -- put a word onto a stream file
4 Version 3 -- 1987-10-15 -- D.N. Lynx Crowe
5
6 WARNING: This fails if the stream is ASCII.
7 ============================================================================
8*/
9
10#include "ram.h"
11
12void putw(int32_t w, FILE *stream)
13{
14 if (putc((int16_t)((w >> 8) & 0xFF), stream) < 0 )
15 return;
16
17 putc((int16_t)(w & 0xFF), stream);
18}
19
Note: See TracBrowser for help on using the repository browser.