# MakePathname

int MakePathname (char directoryName[], char fileName[], char pathName[]);

## Purpose

Creates a pathname from a directory name or path and a filename. The subroutine ensures that a backslash separates the directory name or path and the filename.

### Example

char dirname[MAX_PATHNAME_LEN];
char pathname[MAX_PATHNAME_LEN];
GetProjectDir (dirname);
MakePathname (dirname, "FILE.DAT", pathname);

## Parameters

Input
Name | Type | Description
directoryName | string | The directory name or path to which to append the filename.
fileName | string | Base filename and extension to append to the directory name or path.
Output
Name | Type | Description
pathName | string | The buffer in which the resulting pathname is returned. The buffer must be at least MAX_PATHNAME_LEN bytes long. If the resulting pathname is greater than that size, an empty string is returned in this buffer.

## Return Value

Name | Type | Description
result | integer | The result of the call.
Code | Description
0 | Success.
-1 | Invalid parameter(s).
-2 | Resulting pathname longer than 260 chars.