Pristine Ack-5.5
[Ack-5.5.git] / modules / src / object / wr_ranlib.c
1 /* $Id: wr_ranlib.c,v 1.8 1994/06/24 11:19:35 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 wr_ranlib(fd, ran, cnt1)
10         struct ranlib   *ran;
11         long    cnt1;
12 {
13 #if BYTE_ORDER == 0x0123
14         if (sizeof (struct ranlib) != SZ_RAN)
15 #endif
16         {
17                 register long cnt = cnt1;
18                 register struct ranlib *r = ran;
19                 register char *c = (char *) r;
20
21                 while (cnt--) {
22                         put4(r->ran_off,c); c += 4;
23                         put4(r->ran_pos,c); c += 4;
24                         r++;
25                 }
26         }
27         wr_bytes(fd, (char *) ran, cnt1 * SZ_RAN);
28 }