Yurttas/PL/IL/C/F-mar11/01/02/00/09/get filename.c

 1/*
 2   Copyright(C) 1998
 3   All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
 4
 5   Permission to use, copy, modify, and distribute this
 6   software and its documentation for EDUCATIONAL purposes
 7   and without fee is hereby granted provided that this
 8   copyright notice appears in all copies.
 9 
10   date   : January 1, 1998.
11   authorĀ : Salih Yurttas.
12
13   get_filename.c
14*/
15
16
17#include "common.h"
18
19#include "io.h"
20
21char* get_filename(char *s) {
22  char *filename;
23
24  filename = (char*) malloc(MAX_STRING_SIZE);
25
26  printf("-> %s filenameĀ : ", s);
27  fflush(stdin);
28  scanf("%s", &filename);
29
30  fflush(stdin);
31
32  return filename;
33}