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

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

Use standard integer types.

  • Property mode set to 100644
File size: 826 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 "stdio.h"
9
10extern int16_t getc(FILE *ptr);
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
21int32_t getl(FILE *stream)
22{
23 int32_t temp;
24 register int8_t *t;
25
26 t = &temp;
27
28 *t++ = fgetc(stream);
29 *t++ = fgetc(stream);
30 *t++ = fgetc(stream);
31 *t = fgetc(stream);
32
33 return(temp);
34}
Note: See TracBrowser for help on using the repository browser.