version 1.174, 2006/05/17 19:37:40 |
version 1.175, 2006/05/27 05:49:14 |
|
|
if ((workfile_fd = open(pb.filename, O_RDONLY)) == -1) |
if ((workfile_fd = open(pb.filename, O_RDONLY)) == -1) |
err(1, "%s", pb.filename); |
err(1, "%s", pb.filename); |
|
|
/* |
/* Find RCS file path. */ |
* Test for existence of ,v file. If we are expected to |
fd = rcs_choosefile(pb.filename, pb.fpath, sizeof(pb.fpath)); |
* create one, set NEWFILE flag. |
|
*/ |
|
fd = rcs_statfile(pb.filename, pb.fpath, sizeof(pb.fpath), |
|
pb.flags); |
|
|
|
if (fd < 0) { |
if (fd < 0) { |
if (pb.openflags & RCS_CREATE) |
if (pb.openflags & RCS_CREATE) |
|
|
} |
} |
pb.openflags &= ~RCS_CREATE; |
pb.openflags &= ~RCS_CREATE; |
} |
} |
|
|
/* |
|
* If we are to create a new ,v file, we must decide where it |
|
* should go. |
|
*/ |
|
if (pb.flags & NEWFILE) |
|
fd = rcs_choosefile(pb.filename, |
|
pb.fpath, sizeof(pb.fpath)); |
|
|
|
pb.file = rcs_open(pb.fpath, fd, pb.openflags, pb.fmode); |
pb.file = rcs_open(pb.fpath, fd, pb.openflags, pb.fmode); |
if (pb.file == NULL) |
if (pb.file == NULL) |