_Xstat.c 424 B

123456789101112131415161718192021222324252627282930
  1. #include <sys/types.h>
  2. #include <sys/stat.h>
  3. static Xcvt();
  4. int
  5. _fstat(fd, buf)
  6. int fd;
  7. struct stat *buf;
  8. {
  9. char Xbuf[100];
  10. int retval;
  11. retval = __fstat(fd, Xbuf);
  12. Xcvt(Xbuf, (char *)buf);
  13. return retval;
  14. }
  15. static
  16. Xcvt(buf, statbuf)
  17. char *buf, *statbuf;
  18. {
  19. register char *s, *t;
  20. register int i;
  21. s = buf; t = statbuf;
  22. for (i = 14; i; i--) *t++ = *s++;
  23. *t++ = 0; *t++ = 0;
  24. for (i = 16; i; i--) *t++ = *s++;
  25. }