#include "uucp.h"
#include "uudefs.h"
#include "sysdep.h"
#include "system.h"
boolean
fsysdep_needs_cwd (zfile)
const char *zfile;
{
return *zfile != '/' && *zfile != '~';
}
char *
zsysdep_local_file_cwd (zfile, zpubdir, pfbadname)
const char *zfile;
const char *zpubdir;
boolean *pfbadname;
{
if (pfbadname != NULL)
*pfbadname = FALSE;
if (*zfile == '/')
return zbufcpy (zfile);
else if (*zfile == '~')
return zsysdep_local_file (zfile, zpubdir, pfbadname);
else
return zsysdep_add_cwd (zfile);
}
char *
zsysdep_add_cwd (zfile)
const char *zfile;
{
if (*zfile == '/' || *zfile == '~')
return zbufcpy (zfile);
if (zScwd == NULL)
{
ulog (LOG_ERROR, "Can't determine current directory");
return NULL;
}
return zsysdep_in_dir (zScwd, zfile);
}