#include <stdio.h>
#include <exec/types.h>
#include <exec/io.h>
#include <exec/memory.h>

#include <graphics/gfxbase.h>
#include <graphics/text.h>
#include <graphics/gfxmacros.h>
#include <devices/console.h>
#include <devices/keymap.h>
#include <libraries/dos.h>
#include <libraries/dosextens.h>
#include <intuition/intuition.h>
#include <functions.h>

extern UBYTE filestring[];
extern UBYTE dirstring[];
extern UBYTE the_name[];
extern char *get_fname();

char *get_name(w)
struct Window *w;
{

SHORT quit_sig;
char *go_code;

    go_code = get_fname(w,NULL,"Select a File",filestring,dirstring);

	if(go_code) {
    strcpy(the_name, dirstring);
    if(strlen(the_name)) {
        if((!(the_name[strlen(the_name)-1] == '/'))
            && (!(the_name[strlen(the_name)-1] == ':')))
                strcat(the_name,"/");
        }
    strcat(the_name, filestring);
	}

    return go_code;
}

