Commit | Line | Data |
---|---|---|
3f62363f KB |
1 | /* |
2 | * Copyright (c) 1988 Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
dbf0c423 | 5 | * %sccs.include.redist.c% |
3f62363f | 6 | * |
dbf0c423 | 7 | * @(#)getfile.c 7.5 (Berkeley) %G% |
3f62363f KB |
8 | */ |
9 | ||
68b8c38b BJ |
10 | #include "sys/param.h" |
11 | #include "sys/time.h" | |
3f62363f KB |
12 | #include "saio.h" |
13 | ||
14 | getfile(prompt, mode) | |
15 | char *prompt; | |
16 | int mode; | |
17 | { | |
18 | int fd; | |
19 | char buf[100]; | |
20 | ||
21 | do { | |
22 | printf("%s: ", prompt); | |
23 | gets(buf); | |
24 | } while ((fd = open(buf, mode)) <= 0); | |
25 | return(fd); | |
26 | } |