Last change
on this file since 5f1d169 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
498 bytes
|
Rev | Line | |
---|
[3ae31e9] | 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 "stdio.h"
|
---|
| 11 | #include "stddefs.h"
|
---|
| 12 |
|
---|
| 13 | putw(w, stream)
|
---|
| 14 | register unsigned w;
|
---|
| 15 | FILE *stream;
|
---|
| 16 | {
|
---|
| 17 | if (putc(((w >> 8) & 0xFF), stream) < 0 )
|
---|
| 18 | return;
|
---|
| 19 |
|
---|
| 20 | putc((w & 0xFF), stream);
|
---|
| 21 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.