Last change
on this file since cbe2c15 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
859 bytes
|
Rev | Line | |
---|
[3ae31e9] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | getl.c -- get a 68000 long word from a stream file
|
---|
| 4 | Version 2 -- 1987-10-15 -- D.N. Lynx Crowe
|
---|
| 5 | =============================================================================
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #include "stdio.h"
|
---|
| 9 |
|
---|
| 10 | extern int fgetc();
|
---|
| 11 |
|
---|
| 12 | /*
|
---|
| 13 | =============================================================================
|
---|
| 14 | getl(stream) -- get a long word from 'stream'
|
---|
| 15 |
|
---|
| 16 | Reads a long from 'stream' in Motorola 68000 byte order.
|
---|
| 17 | No special alignment is assumed in the file.
|
---|
| 18 | =============================================================================
|
---|
| 19 | */
|
---|
| 20 |
|
---|
| 21 | long
|
---|
| 22 | getl(stream)
|
---|
| 23 | register FILE *stream;
|
---|
| 24 | {
|
---|
| 25 | long temp;
|
---|
| 26 | register char *t;
|
---|
| 27 |
|
---|
| 28 | t = &temp;
|
---|
| 29 |
|
---|
| 30 | *t++ = fgetc(stream);
|
---|
| 31 | *t++ = fgetc(stream);
|
---|
| 32 | *t++ = fgetc(stream);
|
---|
| 33 | *t = fgetc(stream);
|
---|
| 34 |
|
---|
| 35 | return(temp);
|
---|
| 36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.