/* * This is the same function used in the BDS C Standard Library * and is included for the sake of compatibility. */ swapin(name,addr) char *name; { int fd; if (( fd = open(name,0)) == ERROR) { printf("Swapin: cannot open %s\n",name); return ERROR; } if ((read(fd,addr,512)) < 0) { printf("Swapin: read error on %s\n",name); close(fd); return ERROR; } close(fd); return 0; }