home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
misc
/
volume40
/
vname
/
part01
/
tt.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-11-08
|
503b
|
31 lines
#include <vname.h>
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
int main(argc, argv)
int argc;
char **argv;
{
char buf[1000];
int fd;
extern char *sys_errlist[];
extern int errno;
if (argc == 1) {
while (gets(buf))
(void) printf("%s = [%s]\n", buf, vname(buf));
return (0);
}
while (*++argv) {
fd = vopen(*argv, O_RDONLY, 0);
(void) printf("%s => %s\n", last_vname,
(fd != -1) ? "ok" : sys_errlist[errno]);
if (fd != -1)
(void) vclose(fd);
}
return (0);
}