Commit | Line | Data |
---|---|---|
9d4cb48c KM |
1 | /* Copyright (c) 1979 Regents of the University of California */ |
2 | ||
3 | static char sccsid[] = "@(#)PUT.c 1.1 %G%"; | |
4 | ||
5 | #include "h00vars.h" | |
6 | #include "h01errs.h" | |
7 | ||
8 | PUT(curfile) | |
9 | ||
10 | register struct iorec *curfile; | |
11 | { | |
12 | if (curfile->funit & FREAD) { | |
13 | ERROR(EWRITEIT, curfile->pfname); | |
14 | return; | |
15 | } | |
16 | fwrite(curfile->fileptr, curfile->fsize, 1, curfile->fbuf); | |
17 | if (ferror(curfile->fbuf)) { | |
18 | ERROR(EWRITE, curfile->pfname); | |
19 | return; | |
20 | } | |
21 | } |