0db158d614453d6d0583face86d843a03c3a8f99
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
* determine accessability of a file
* ierror = access(filename, mode)
* ierror will be 0 for successful access; an error number otherwise.
* filename is a character string
* mode is a character string which may include any combination of
* 'r', 'w', 'x', ' '. (' ' => test for existence)
#include "../libI77/f_errno.h"
long access_(name
, mode
, namlen
, modlen
)
if (namlen
>= sizeof buf
)
return((long)(errno
=F_ERARG
));
g_char(name
, namlen
, buf
);
return((long)(errno
=ENOENT
));
while (modlen
--) switch(*mode
++)
if (m
> 0 && access(buf
, m
) < 0)