133436Sbostic /* 2*63370Sbostic * Copyright (c) 1988, 1993 3*63370Sbostic * The Regents of the University of California. All rights reserved. 433436Sbostic * 544516Sbostic * %sccs.include.redist.c% 633436Sbostic * 7*63370Sbostic * @(#)getfile.c 8.1 (Berkeley) 06/11/93 833436Sbostic */ 933436Sbostic 1049166Sbostic #include <sys/param.h> 1149166Sbostic #include <sys/time.h> 1260328Smckusick #include <stand.att/saio.h> 1333436Sbostic getfile(prompt,mode)1433436Sbosticgetfile(prompt, mode) 1533436Sbostic char *prompt; 1633436Sbostic int mode; 1733436Sbostic { 1833436Sbostic int fd; 1933436Sbostic char buf[100]; 2033436Sbostic 2133436Sbostic do { 2233436Sbostic printf("%s: ", prompt); 2333436Sbostic gets(buf); 2433436Sbostic } while ((fd = open(buf, mode)) <= 0); 2533436Sbostic return(fd); 2633436Sbostic } 27