Pristine Ack-5.5
[Ack-5.5.git] / modules / src / object / rd_ranlib.c
1 /* $Id: rd_ranlib.c,v 1.6 1994/06/24 11:19:07 ceriel Exp $ */
2 /*
3  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4  * See the copyright notice in the ACK home directory, in the file "Copyright".
5  */
6 #include "obj.h"
7
8 void
9 rd_ranlib(fd, ran, cnt)
10         register struct ranlib  *ran;
11         register long   cnt;
12 {
13         rd_bytes(fd, (char *) ran, cnt * SZ_RAN);
14 #if BYTE_ORDER == 0x0123
15         if (sizeof (struct ranlib) != SZ_RAN)
16 #endif
17         {
18                 register char *c = (char *) ran + cnt * SZ_RAN;
19
20                 ran += cnt;
21                 while (cnt--) {
22                         ran--;
23                         c -= 4; ran->ran_pos = get4(c);
24                         c -= 4; ran->ran_off = get4(c);
25                 }
26         }
27 }