13 #include "gb/files_rw.h" 20 void Fileread(
int fd,
char *p,
int num,
int posn) {
23 if (lseek(fd, posn, L_SET) < 0) {
27 if ((n2 = read(fd, p, num)) != num) {
32 void Filewrite(
int fd,
char *p,
int num,
int posn) {
35 if (lseek(fd, posn, L_SET) < 0) {
36 perror(
"Filewrite 1");
40 if ((n2 = write(fd, p, num)) != num) {
41 perror(
"Filewrite 2");
void Fileread(int, char *, int, int)
void Filewrite(int, char *, int, int)