home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
pcmag
/
vol7n14.arc
/
TRYQFN.C
< prev
Wrap
Text File
|
1988-04-25
|
972b
|
38 lines
/*
TRYQFN.C Demonstration of use of QFN.C
module to qualify filenames.
Ray Duncan, April 1988
*/
#include <stdio.h>
extern char *qfn(char *);
main(int argc, char *argv[])
{
char buffer[80]; /* buffer for user input */
char *p; /* receives ptr from qfn */
while(1) /* do until empty line */
{
/* prompt user for filename */
printf("\nEnter filename: ");
gets(buffer); /* read in filename */
if(buffer[0] == 0) break; /* exit if no entry */
p = qfn(buffer); /* else qualify filename */
if(p != NULL) /* display filename or
error message */
printf("\nThe full pathname is: %s\n",p);
else printf("\nBad filename!\n");
}
}