rd_ranlib.c 572 B

1234567891011121314151617181920212223242526
  1. /* $Header$ */
  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 <ranlib.h>
  7. #include "object.h"
  8. rd_ranlib(fd, ran, cnt)
  9. register struct ranlib *ran;
  10. register long cnt;
  11. {
  12. rd_bytes(fd, (char *) ran, cnt * SZ_RAN);
  13. #if ! (BYTES_REVERSED || WORDS_REVERSED)
  14. if (sizeof (struct ranlib) != SZ_RAN)
  15. #endif
  16. {
  17. register char *c = (char *) ran;
  18. while (cnt--) {
  19. ran->ran_off = get4(c); c += 4;
  20. ran->ran_pos = get4(c); c += 4;
  21. ran++;
  22. }
  23. }
  24. }