- if ((fdesc = open (s,0)) == -1)
- norec (s);
- read (fdesc,board,sizeof board);
- read (fdesc,off,sizeof off);
- read (fdesc,in,sizeof in);
- read (fdesc,dice,sizeof dice);
- read (fdesc,&cturn,sizeof cturn);
- read (fdesc,&dlast,sizeof dlast);
- read (fdesc,&pnum,sizeof pnum);
- read (fdesc,&rscore,sizeof rscore);
- read (fdesc,&wscore,sizeof wscore);
- read (fdesc,&gvalue,sizeof gvalue);
- read (fdesc,&raflag,sizeof raflag);
- close (fdesc);
+ if ((fdesc = open(s, O_RDONLY)) == -1)
+ norec(s);
+ read(fdesc, board, sizeof board);
+ read(fdesc, off, sizeof off);
+ read(fdesc, in, sizeof in);
+ read(fdesc, dice, sizeof dice);
+ read(fdesc, &cturn, sizeof cturn);
+ read(fdesc, &dlast, sizeof dlast);
+ read(fdesc, &pnum, sizeof pnum);
+ read(fdesc, &rscore, sizeof rscore);
+ read(fdesc, &wscore, sizeof wscore);
+ read(fdesc, &gvalue, sizeof gvalue);
+ read(fdesc, &raflag, sizeof raflag);
+ close(fdesc);