/* get file association function from FA file based on extension */
_fileafunc(dext = "", dfile = "")
{
dfunc = "";
if (strlen(dext) > 0)
{
if (strlen(dfile) == 0)
{
dfile = _fileafname();
}
/* stringify file */
dstr = strfile(dfile, 0, 1);
/* locate extension */
dfunc = strfind(dext, dstr);
/* comma, space and newlines are separators */
dfunc = strget(2, dfunc, strescape(", \n"));
}
return(dfunc);
}