version 1.2, 1996/06/10 11:21:34 |
version 1.3, 1996/09/24 04:19:30 |
|
|
int r; |
int r; |
bool tty2 = isatty(2); |
bool tty2 = isatty(2); |
|
|
Sprintf(buf, pat, arg1, arg2, arg3); |
Snprintf(buf, sizeof buf, pat, arg1, arg2, arg3); |
Fflush(stderr); |
Fflush(stderr); |
write(2, buf, strlen(buf)); |
write(2, buf, strlen(buf)); |
if (tty2) { /* might be redirected to a file */ |
if (tty2) { /* might be redirected to a file */ |
|
|
/* Put any leading path into `tmpbuf'. */ |
/* Put any leading path into `tmpbuf'. */ |
strncpy(tmpbuf, name, pathlen); |
strncpy(tmpbuf, name, pathlen); |
|
|
#define try(f, a1, a2) (Sprintf(tmpbuf + pathlen, f, a1, a2), stat(tmpbuf, &filestat) == 0) |
#define try(f, a1, a2) (Snprintf(tmpbuf + pathlen, sizeof tmpbuf - pathlen, f, a1, a2), stat(tmpbuf, &filestat) == 0) |
if ( try("RCS/%s%s", filebase, RCSSUFFIX) |
if ( try("RCS/%s%s", filebase, RCSSUFFIX) |
|| try("RCS/%s" , filebase, 0) |
|| try("RCS/%s" , filebase, 0) |
|| try( "%s%s", filebase, RCSSUFFIX) |
|| try( "%s%s", filebase, RCSSUFFIX) |