projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
date and time created 82/02/02 16:00:30 by mckusick
[unix-history]
/
usr
/
src
/
usr.bin
/
pascal
/
libpc
/
UNSYNC.c
diff --git
a/usr/src/usr.bin/pascal/libpc/UNSYNC.c
b/usr/src/usr.bin/pascal/libpc/UNSYNC.c
index
792cdfa
..
7e58332
100644
(file)
--- a/
usr/src/usr.bin/pascal/libpc/UNSYNC.c
+++ b/
usr/src/usr.bin/pascal/libpc/UNSYNC.c
@@
-1,9
+1,8
@@
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)UNSYNC.c 1.
1
%G%";
+static char sccsid[] = "@(#)UNSYNC.c 1.
3
%G%";
#include "h00vars.h"
#include "h00vars.h"
-#include "h01errs.h"
/*
* push back last char read to prepare for formatted read
/*
* push back last char read to prepare for formatted read
@@
-13,7
+12,12
@@
UNSYNC(curfile)
register struct iorec *curfile;
{
if (curfile->funit & FWRITE) {
register struct iorec *curfile;
{
if (curfile->funit & FWRITE) {
- ERROR(EREADIT, curfile->pfname);
+ ERROR("%s: Attempt to read, but open for writing\n",
+ curfile->pfname);
+ return;
+ }
+ if (curfile->funit & EOFF) {
+ ERROR("%s: Tried to read past end of file\n", curfile->pfname);
return;
}
if ((curfile->funit & SYNC) == 0) {
return;
}
if ((curfile->funit & SYNC) == 0) {