Commit | Line | Data |
---|---|---|
b0382525 | 1 | /*- |
80409bdc KB |
2 | * Copyright (c) 1993 |
3 | * The Regents of the University of California. All rights reserved. | |
b0382525 KM |
4 | * |
5 | * %sccs.include.redist.c% | |
6 | * | |
80409bdc | 7 | * @(#)getfile.c 8.1 (Berkeley) %G% |
b0382525 KM |
8 | */ |
9 | ||
10 | getfile(prompt, mode) | |
11 | char *prompt; | |
12 | int mode; | |
13 | { | |
14 | int fd; | |
15 | char buf[100]; | |
16 | ||
17 | do { | |
18 | printf("%s: ", prompt); | |
19 | gets(buf); | |
20 | } while ((fd = open(buf, mode)) < 0); | |
21 | ||
22 | return (fd); | |
23 | } |