summaryrefslogtreecommitdiff
path: root/systems/knuth/local/texware/access.c
blob: 6fde385791ae4fdb163affe22ed2267fbcf78c25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#define namelength 100          /* must agree with tftopl.ch and pltotf.ch */

bool testreadaccess(fn)
	char  *fn;
{
	register char *p;

	fn[namelength-1] = ' ';
	p = fn;
	while (*p++ != ' ');
	p--;
	*p = '\0';
	if (access(fn,4)==0) {
	  *p = ' '; return(TRUE);}
	else {*p = ' '; return(FALSE);}
}