source:
buchla-68k/libcio/putw.c@
c59409e
| Last change on this file since c59409e was f261cc8, checked in by , 8 years ago | |
|---|---|
|
|
| File size: 456 bytes | |
| Rev | Line | |
|---|---|---|
| [f40a309] | 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 | ||
| [b28a12e] | 10 | #include "ram.h" |
| [f40a309] | 11 | |
| [8973acd] | 12 | void putw(int32_t w, FILE *stream) |
| [f40a309] | 13 | { |
| [f261cc8] | 14 | if (putc((int16_t)((w >> 8) & 0xFF), stream) < 0 ) |
| [f40a309] | 15 | return; |
| 16 | ||
| [f261cc8] | 17 | putc((int16_t)(w & 0xFF), stream); |
| [f40a309] | 18 | } |
| [6262b5c] | 19 |
Note:
See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](http://bob.lopatic.de/chrome/site/logo.png)