rd_ranlib.c 563 B

123456789101112131415161718192021222324252627
  1. /* $Id$ */
  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. void
  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 BYTE_ORDER == 0x0123
  14. if (sizeof (struct ranlib) != SZ_RAN)
  15. #endif
  16. {
  17. register char *c = (char *) ran + cnt * SZ_RAN;
  18. ran += cnt;
  19. while (cnt--) {
  20. ran--;
  21. c -= 4; ran->ran_pos = get4(c);
  22. c -= 4; ran->ran_off = get4(c);
  23. }
  24. }
  25. }