Commit | Line | Data |
---|---|---|
3f62363f | 1 | /* |
80409bdc KB |
2 | * Copyright (c) 1988, 1993 |
3 | * The Regents of the University of California. All rights reserved. | |
3f62363f | 4 | * |
dbf0c423 | 5 | * %sccs.include.redist.c% |
3f62363f | 6 | * |
80409bdc | 7 | * @(#)getfile.c 8.1 (Berkeley) %G% |
3f62363f KB |
8 | */ |
9 | ||
8ce1460e KB |
10 | #include <sys/param.h> |
11 | #include <sys/time.h> | |
61ef809e | 12 | #include <stand.att/saio.h> |
3f62363f KB |
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 | } |