source: buchla-68k/libcio/getl.c@ f806726

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

No more warnings in libcio.

  • Property mode set to 100644
File size: 834 bytes
Line 
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 "ram.h"
9
10/*
11 =============================================================================
12 getl(stream) -- get a long word from 'stream'
13
14 Reads a long from 'stream' in Motorola 68000 byte order.
15 No special alignment is assumed in the file.
16 =============================================================================
17*/
18
19int32_t getl(FILE *stream)
20{
21 int32_t temp;
22 register int8_t *t;
23
24 t = (int8_t *)&temp;
25
26 *t++ = (int8_t)fgetc(stream);
27 *t++ = (int8_t)fgetc(stream);
28 *t++ = (int8_t)fgetc(stream);
29 *t = (int8_t)fgetc(stream);
30
31 return(temp);
32}
33
Note: See TracBrowser for help on using the repository browser.